test(stdlib): cover every bundled module through std imports

This commit is contained in:
Marqdo Agent committed 2026-11-21 01:50:01 +08:00
1 parent a8ccac9e67
commit 04eae8746e
13 files changed
+246 -5

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
---
import:
console: "std:io/console"
---
## main
**行 = console.读取行()**
*[行.ok, 行.value]*
+8
View File
@@ -0,0 +1,8 @@
---
import:
format: "std:format"
---
## main
*[format.字节长度("Aé"), format.显示(["文本", 2, 1.5]), format.显示({a: 1}), format.列表显示(["a", 2]), format.显示(None)]*
+10
View File
@@ -0,0 +1,10 @@
---
import:
stream: "std:io/stream"
---
## main
**结果 = stream.写文本("stream\n")**
*[结果.ok, 结果.value.count]*
+12
View File
@@ -0,0 +1,12 @@
---
import:
text: "std:text"
---
## main
**内存 = memory.new(1, 1)**
**长度 = text.utf8编码("é", 内存, 0)**
*[长度, 内存[0], 内存[1]]*
+12
View File
@@ -0,0 +1,12 @@
---
import:
utf8: "std:text/utf8"
---
## main
**内存 = memory.new(1, 1)**
**长度 = utf8.编码("é", 内存, 0)**
*[长度, utf8.解码(内存, 0, 长度).value, utf8.解码(内存, 0, 1).ok]*