migrate: own clock/datetime/env/process/random sources and baseline assertions
Move the official stdlib system modules to their unique source authority without changing public std: paths or host authorization. Carry the pre-migration product assertions into component cases captured from the baseline Bundle; the process case resolves the granted program and expected stdout from the verified CLI. Refs cflmy/marqdo#9, cflmy/marqdo-std-system#1
This commit was merged in pull request #2.
This commit is contained in:
1 parent
e1c4da4cc5
commit
053ddb0e59
19 files changed
+949
-6
No files matched your search
@@ -0,0 +1,30 @@
|
||||
|
||||
# @exec env
|
||||
## 读取
|
||||
|
||||
`params(名称)`
|
||||
|
||||
读取一个显式授权的环境变量。名称是精确匹配,不支持 glob;未授权是
|
||||
permission.denied,未设置是 env.not_found,非 UTF-8 是
|
||||
env.not_unicode。
|
||||
|
||||
`return resource.request("env.get", [名称])`
|
||||
|
||||
## 存在
|
||||
|
||||
`params(名称)`
|
||||
|
||||
**结果 = 读取(名称)**
|
||||
|
||||
`if 结果.ok`
|
||||
|
||||
`return {ok: true, value: true}`
|
||||
|
||||
`else`
|
||||
`if 结果.code == "env.not_found"`
|
||||
|
||||
`return {ok: true, value: false}`
|
||||
|
||||
`end`
|
||||
`end`
|
||||
`return 结果`
|
||||
Reference in new issue
Block a user