* finish the Windows IO layer changes; refs #11618 * added system.getOsFileHandle which is less error-prone on Windows * make tests green again
This commit is contained in:
parent
ac7a365137
commit
742862b847
4 changed files with 55 additions and 8 deletions
27
tests/system/techo_unicode.nim
Normal file
27
tests/system/techo_unicode.nim
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue