add utf-8 identifier check in nasal_lexer & fix printf format at windows platform & add test file utf8chk.nas

This commit is contained in:
ValKmjolnir
2022-05-07 16:50:13 +08:00
parent de262980cc
commit 51a1279110
6 changed files with 97 additions and 24 deletions

View File

@@ -65,8 +65,9 @@ var testfile=[
"test/tetris.nas ",
"test/trait.nas ",
"test/turingmachine.nas",
"test/ycombinator.nas ",
"test/wavecollapse.nas "
"test/utf8chk.nas ",
"test/wavecollapse.nas ",
"test/ycombinator.nas "
];
var module=[

11
test/utf8chk.nas Normal file
View File

@@ -0,0 +1,11 @@
var 输出=print;
var 这是unicode测试=func(){
var 测试成功=[
"unicode: utf-8支持测试成功",
"目前仅支持utf-8以及ascii格式文件",
"注意: windows系统请开启chcp 65001代码页"
];
foreach(var 内容;测试成功)
输出(内容~"\n");
}
这是unicode测试();