diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-08-18 22:57:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-18 22:57:56 +0200 |
commit | 742862b847646dff4562992cd502d3077b2c9474 (patch) | |
tree | 8ffdf07aa85b7d593a2450c20425bf91c210ef93 /tests | |
parent | ac7a3651379f0601f9bbf5b1d613c8d6eb89cf4c (diff) | |
download | Nim-742862b847646dff4562992cd502d3077b2c9474.tar.gz |
more enhancements for #11618 (#11976)
* finish the Windows IO layer changes; refs #11618 * added system.getOsFileHandle which is less error-prone on Windows * make tests green again
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/techo_unicode.nim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/system/techo_unicode.nim b/tests/system/techo_unicode.nim new file mode 100644 index 000000000..d0395224b --- /dev/null +++ b/tests/system/techo_unicode.nim @@ -0,0 +1,27 @@ +discard """ + output: '''ÄhmÖÜ +abasdfdsmÄhmaИ +Иnastystring +A你好 +ИnastystringA你好 +ÖÜhmabasdfdsmÄhmaИ''' + disabled: "posix" + joinable: "false" +""" + +import winlean + +echo "ÄhmÖÜ" +echo "abasdfdsmÄhmaИ" +echo "И\0nasty\0\0\0\0string\0" +echo "A你好" + +write stdout, "И\0nasty\0\0\0\0string\0" +writeLine stdout, "A你好" +stdout.flushFile() + +let handle = getOsFileHandle(stdout) +var a = "ÖÜhmabasdfdsmÄhmaИ" +var ac = 0'i32 +discard writeFile(handle, addr a[0], int32(len(a)), addr ac, nil) +stdout.flushFile() |