smoke: keep language-only execution after removing the Bundle
Moving the shipped stdlib aside must fail the print program with an explicit diagnostic and still run a language-only program. The archive smoke and the cold-install container now both call the factorial example after the move, and the archive contract test pins the new message.
This commit is contained in:
1 parent
ab6b6b1a23
commit
0e1efc713e
3 files changed
+12
No files matched your search
@@ -281,6 +281,16 @@ def main(argv: list[str]) -> int:
|
||||
if "stdlib" not in message and "打印" not in message and "symbol.unknown" not in message:
|
||||
fail(f"missing-stdlib failure is not explicit: {message!r}")
|
||||
print("smoke: bundled stdlib missing -> fail-closed OK")
|
||||
# A program that uses only the language must still run.
|
||||
language_only = runner.run(
|
||||
["call", "examples/factorial.mq.md", "阶乘", "--arg", "n=5"]
|
||||
).stdout.strip()
|
||||
if language_only != "120":
|
||||
fail(
|
||||
f"language-only call failed without the bundled stdlib: "
|
||||
f"{language_only!r}"
|
||||
)
|
||||
print("smoke: language-only program runs without the bundled stdlib")
|
||||
finally:
|
||||
hidden.rename(install / "stdlib")
|
||||
factor = runner.run(
|
||||
|
||||
Reference in new issue
Block a user