From ac78d2e78da05f85a053548b1a83141a27228c29 Mon Sep 17 00:00:00 2001 From: Isa <isa@isoux.org> Date: Sat, 12 Aug 2023 20:09:34 +0300 Subject: [PATCH] FIX: Stream-IO-test.reds for Linux When compiled for Linux and run on it, the test does not produce a test-oi.bin file but a file named "t". It is obvious that the way of declaring the variable name: #u16 "test-io.bin" is not suitable for Linux. After removing #u16 the mentioned file is produced with the full name. I couldn't have found a better solution with my novice experience. --- Library/Stream-IO/examples/Stream-IO-test.reds | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Stream-IO/examples/Stream-IO-test.reds b/Library/Stream-IO/examples/Stream-IO-test.reds index d1a417a..d00c63c 100644 --- a/Library/Stream-IO/examples/Stream-IO-test.reds +++ b/Library/Stream-IO/examples/Stream-IO-test.reds @@ -23,7 +23,10 @@ Red/System [ #include %../Stream-IO-read.reds #include %../Stream-IO-write.reds -name: #u16 "test-io.bin" +#either OS = 'Linux [ + name: "test-io.bin" ][ + name: #u16 "test-io.bin" +] file: simple-io/open-file name 0 true print-line ["file handle: " as int-ptr! file] @@ -105,4 +108,4 @@ print-line readString ;= Integer: 42 float: 3.14 pos: 00000042h logic: true print-line readString ;= ending? -print-line "^/-- end reading --^/" \ No newline at end of file +print-line "^/-- end reading --^/"