feat(stdlib): Mid M6 log levels and UUID v4
Close the mid-tier stdlib waves with filtered one-line logs and cryptographic UUID minting in lib/, plus golds and public demos. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7d86ed1d9c
commit
f4b39dfe80
20 files changed
+430
-15
No files matched your search
@@ -1168,6 +1168,19 @@ fn lib_cli_zh_smoke() {
|
||||
assert_out("tests/lib/表-命令行-烟测.mq.md", "a,b,c\n1\nTrue");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lib_log_uuid_smoke() {
|
||||
assert_out(
|
||||
"tests/lib/log-uuid-smoke.mq.md",
|
||||
"INFO hello-info\nDEBUG shown-debug\n36\nTrue",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lib_log_uuid_zh_smoke() {
|
||||
assert_out("tests/lib/日志-标识-烟测.mq.md", "INFO 中文信息\n36");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lib_re_smoke() {
|
||||
assert_out(
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: lib/log + uuid smoke
|
||||
import log:lib/log.mq.md
|
||||
import uuid:lib/uuid.mq.md
|
||||
import re:lib/re.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
> log.info text="hello-info"
|
||||
|
||||
> log.debug text="hidden"
|
||||
|
||||
> log.set_level level="debug"
|
||||
|
||||
> log.debug text="shown-debug"
|
||||
|
||||
*id = > uuid.v4*
|
||||
*n = > len `id`*
|
||||
> print text=`n`
|
||||
*ok = > re.is_match text=`id` pattern="^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"*
|
||||
> print text=`ok`
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: lib/日志与标识 烟测
|
||||
导入 日志:lib/日志.mq.md
|
||||
导入 标识:lib/标识.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
> 日志.信息 内容="中文信息"
|
||||
|
||||
*id = > 标识.版本4*
|
||||
*n = > 长度 `id`*
|
||||
> 打印 内容=`n`
|
||||
Reference in new issue
Block a user