test: group examples into per-category folders
Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
This commit is contained in:
1
examples/modules/expected/0700-modules-import.exit
Normal file
1
examples/modules/expected/0700-modules-import.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0700-modules-import.stderr
Normal file
1
examples/modules/expected/0700-modules-import.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
examples/modules/expected/0700-modules-import.stdout
Normal file
2
examples/modules/expected/0700-modules-import.stdout
Normal file
@@ -0,0 +1,2 @@
|
||||
hello thereafter hello
|
||||
[1.000000, 2.000000, 3.000000]
|
||||
1
examples/modules/expected/0701-modules-c-import.exit
Normal file
1
examples/modules/expected/0701-modules-c-import.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0701-modules-c-import.stderr
Normal file
1
examples/modules/expected/0701-modules-c-import.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
examples/modules/expected/0701-modules-c-import.stdout
Normal file
2
examples/modules/expected/0701-modules-c-import.stdout
Normal file
@@ -0,0 +1,2 @@
|
||||
add_numbers(10, 20) = 30
|
||||
multiply(5, 6) = 30
|
||||
1
examples/modules/expected/0702-modules-c-import-ns.exit
Normal file
1
examples/modules/expected/0702-modules-c-import-ns.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
tc.add_numbers(10, 20) = 30
|
||||
tc.multiply(5, 6) = 30
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
w.v = 30
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
42
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,17 @@
|
||||
error: 'c_only_fn' is not visible; #import the module that declares it
|
||||
--> examples/modules/0706-modules-import-non-transitive.sx:15:37
|
||||
|
|
||||
15 | print("c_only_fn direct: {}\n", c_only_fn());
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: 'c_only_const' is not visible; #import the module that declares it
|
||||
--> examples/modules/0706-modules-import-non-transitive.sx:16:40
|
||||
|
|
||||
16 | print("c_only_const direct: {}\n", c_only_const);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: unresolved 'c_only_const' (in examples/modules/0706-modules-import-non-transitive.sx fn main)
|
||||
--> examples/modules/0706-modules-import-non-transitive.sx:16:40
|
||||
|
|
||||
16 | print("c_only_const direct: {}\n", c_only_const);
|
||||
| ^^^^^^^^^^^^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
b=42
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
items:
|
||||
item 0
|
||||
item 1
|
||||
item 2
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
7
|
||||
1
examples/modules/expected/0710-modules-sha256.exit
Normal file
1
examples/modules/expected/0710-modules-sha256.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0710-modules-sha256.stderr
Normal file
1
examples/modules/expected/0710-modules-sha256.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
4
examples/modules/expected/0710-modules-sha256.stdout
Normal file
4
examples/modules/expected/0710-modules-sha256.stdout
Normal file
@@ -0,0 +1,4 @@
|
||||
empty: ok
|
||||
abc: ok
|
||||
multi: ok
|
||||
stream-eq-oneshot: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
15
examples/modules/expected/0711-modules-sha256-vectors.stdout
Normal file
15
examples/modules/expected/0711-modules-sha256-vectors.stdout
Normal file
@@ -0,0 +1,15 @@
|
||||
empty: ok
|
||||
abc: ok
|
||||
nist-56: ok
|
||||
nist-112: ok
|
||||
len-0: ok
|
||||
len-55: ok
|
||||
len-56: ok
|
||||
len-57: ok
|
||||
len-63: ok
|
||||
len-64: ok
|
||||
len-65: ok
|
||||
len-119: ok
|
||||
len-120: ok
|
||||
a-1000: ok
|
||||
a-1000000: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
oneshot-pinned: ok
|
||||
byte-at-a-time: ok
|
||||
split-mid-block: ok
|
||||
split-on-boundary: ok
|
||||
file-eq-memory: ok
|
||||
file-pinned: ok
|
||||
1
examples/modules/expected/0713-modules-json-writer.exit
Normal file
1
examples/modules/expected/0713-modules-json-writer.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
doc: {"name":"a\"b\n","tab":"x\ty","bs":"c\\d","ctrl":"\u0001","n":-7,"zero":0,"pos":7,"min":-9223372036854775808,"max":9223372036854775807,"ok":true,"nil":null,"xs":[1,-2,3],"nested":{"k":"v"}}
|
||||
buffer-exact: ok
|
||||
buffer-len: ok
|
||||
overflow-raised: ok
|
||||
file-exact: ok
|
||||
1
examples/modules/expected/0714-modules-json-reader.exit
Normal file
1
examples/modules/expected/0714-modules-json-reader.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
43
examples/modules/expected/0714-modules-json-reader.stdout
Normal file
43
examples/modules/expected/0714-modules-json-reader.stdout
Normal file
@@ -0,0 +1,43 @@
|
||||
root-is-object: ok
|
||||
member-count: ok
|
||||
key-order-0: ok
|
||||
string-plain: ok
|
||||
string-escaped: ok
|
||||
array-len: ok
|
||||
array-pos: ok
|
||||
array-neg: ok
|
||||
bool-value: ok
|
||||
null-value: ok
|
||||
nested-pair: ok
|
||||
plain-is-view: ok
|
||||
escaped-allocated: ok
|
||||
round-trip: ok
|
||||
ws-count: ok
|
||||
ws-first: ok
|
||||
ws-last: ok
|
||||
empty-array: ok
|
||||
empty-object: ok
|
||||
uni-len: ok
|
||||
uni-A: ok
|
||||
uni-e1: ok
|
||||
uni-e2: ok
|
||||
uni-i0: ok
|
||||
uni-i1: ok
|
||||
uni-i2: ok
|
||||
uni-i3: ok
|
||||
err-truncated: ok
|
||||
err-bad-escape: ok
|
||||
err-trailing-junk: ok
|
||||
err-bad-token: ok
|
||||
err-fraction: ok
|
||||
err-leading-zero: ok
|
||||
err-overflow: ok
|
||||
err-unterminated: ok
|
||||
err-raw-tab: ok
|
||||
err-raw-lf: ok
|
||||
err-raw-nul: ok
|
||||
esc-ctrl-len: ok
|
||||
esc-tab: ok
|
||||
esc-lf: ok
|
||||
esc-u: ok
|
||||
=== DONE ===
|
||||
1
examples/modules/expected/0715-modules-json-suite.exit
Normal file
1
examples/modules/expected/0715-modules-json-suite.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0715-modules-json-suite.stderr
Normal file
1
examples/modules/expected/0715-modules-json-suite.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
40
examples/modules/expected/0715-modules-json-suite.stdout
Normal file
40
examples/modules/expected/0715-modules-json-suite.stdout
Normal file
@@ -0,0 +1,40 @@
|
||||
doc: {"esc":"\"\\\b\t\n\f\r\u0001","zero":0,"neg":-7,"min":-9223372036854775808,"max":9223372036854775807,"ok":true,"nil":null,"xs":[1,-2,3],"nested":{"k":"v"}}
|
||||
rt-exact: ok
|
||||
rt-len: ok
|
||||
rt-idempotent: ok
|
||||
st-count: ok
|
||||
st-order: ok
|
||||
st-esc: ok
|
||||
st-zero: ok
|
||||
st-neg: ok
|
||||
st-min: ok
|
||||
st-max: ok
|
||||
st-bool: ok
|
||||
st-null: ok
|
||||
st-xs: ok
|
||||
st-nested: ok
|
||||
dec-slash: ok
|
||||
dec-escapes: ok
|
||||
dec-surrogate: ok
|
||||
dec-esc-ctrl: ok
|
||||
rt-utf8: ok
|
||||
err-token-literal: ok
|
||||
err-token-key: ok
|
||||
err-token-comma: ok
|
||||
err-end-object: ok
|
||||
err-end-array: ok
|
||||
err-end-string: ok
|
||||
err-esc-unknown: ok
|
||||
err-esc-bad-hex: ok
|
||||
err-esc-surrogate: ok
|
||||
err-num-leadzero: ok
|
||||
err-num-lonedash: ok
|
||||
err-num-fraction: ok
|
||||
err-num-exponent: ok
|
||||
err-num-overflow: ok
|
||||
err-trail-array: ok
|
||||
err-trail-scalar: ok
|
||||
err-ctrl-tab: ok
|
||||
err-ctrl-lf: ok
|
||||
err-ctrl-nul: ok
|
||||
=== DONE ===
|
||||
1
examples/modules/expected/0716-modules-cli-argv.exit
Normal file
1
examples/modules/expected/0716-modules-cli-argv.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0716-modules-cli-argv.stderr
Normal file
1
examples/modules/expected/0716-modules-cli-argv.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
examples/modules/expected/0716-modules-cli-argv.stdout
Normal file
3
examples/modules/expected/0716-modules-cli-argv.stdout
Normal file
@@ -0,0 +1,3 @@
|
||||
argc>=1: ok
|
||||
arg0-nonempty: ok
|
||||
argc-consistent: ok
|
||||
1
examples/modules/expected/0717-modules-cli-parse.exit
Normal file
1
examples/modules/expected/0717-modules-cli-parse.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0717-modules-cli-parse.stderr
Normal file
1
examples/modules/expected/0717-modules-cli-parse.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
50
examples/modules/expected/0717-modules-cli-parse.stdout
Normal file
50
examples/modules/expected/0717-modules-cli-parse.stdout
Normal file
@@ -0,0 +1,50 @@
|
||||
dispatch-group: ok
|
||||
dispatch-command: ok
|
||||
dispatch-index: ok
|
||||
flag-value: ok
|
||||
flag-value-set: ok
|
||||
bool-set: ok
|
||||
json-set: ok
|
||||
no-rest: ok
|
||||
value-is-view: ok
|
||||
group-is-view: ok
|
||||
dispatch-2nd: ok
|
||||
2nd-bool: ok
|
||||
2nd-json-unset: ok
|
||||
sep-value: ok
|
||||
sep-rest-len: ok
|
||||
sep-rest-0: ok
|
||||
sep-rest-1: ok
|
||||
sep-no-bool: ok
|
||||
bare-rest-len: ok
|
||||
bare-rest-0: ok
|
||||
dash-value: ok
|
||||
err-zero-args: ok
|
||||
err-unknown-cmd: ok
|
||||
err-unknown-group: ok
|
||||
err-too-few: ok
|
||||
err-unknown-flag: ok
|
||||
err-missing-value: ok
|
||||
err-value-eats-flag: ok
|
||||
err-missing-req: ok
|
||||
err-too-many-flags: ok
|
||||
diag-flag-tag: ok
|
||||
diag-flag-token: ok
|
||||
diag-cmd-tag: ok
|
||||
diag-cmd-token: ok
|
||||
diag-group-tag: ok
|
||||
diag-group-token: ok
|
||||
diag-too-few-tag: ok
|
||||
diag-too-few-token: ok
|
||||
diag-zero-args-tag: ok
|
||||
diag-zero-args-token: ok
|
||||
diag-missing-value-tag: ok
|
||||
diag-missing-value-token: ok
|
||||
diag-value-eats-tag: ok
|
||||
diag-value-eats-token: ok
|
||||
diag-req-tag: ok
|
||||
diag-req-token: ok
|
||||
diag-req-index: ok
|
||||
diag-too-many-tag: ok
|
||||
diag-too-many-token: ok
|
||||
=== DONE ===
|
||||
@@ -0,0 +1 @@
|
||||
64
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unknown command 'deploy' (argv index 1)
|
||||
@@ -0,0 +1,6 @@
|
||||
ex-ok-is-0: ok
|
||||
ex-usage-is-64: ok
|
||||
json-set-true: ok
|
||||
json-set-false: ok
|
||||
{"out":"dist"}
|
||||
usage-error-raised: ok
|
||||
1
examples/modules/expected/0719-modules-cli-and-json.exit
Normal file
1
examples/modules/expected/0719-modules-cli-and-json.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
10
examples/modules/expected/0719-modules-cli-and-json.stdout
Normal file
10
examples/modules/expected/0719-modules-cli-and-json.stdout
Normal file
@@ -0,0 +1,10 @@
|
||||
cli-group: ok
|
||||
cli-command: ok
|
||||
cli-index: ok
|
||||
cli-flag: ok
|
||||
json-members: ok
|
||||
json-key0: ok
|
||||
json-str: ok
|
||||
json-arr-len: ok
|
||||
json-arr-2: ok
|
||||
=== DONE ===
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
qualified-own-import: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
terminating-callee: ok
|
||||
after
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from_a binds a.greet: ok
|
||||
from_b binds b.greet: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
bare binds flat: ok
|
||||
nm.value binds named: ok
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,5 @@
|
||||
error: 'dup' is ambiguous; declared by multiple imported modules — qualify the call
|
||||
--> examples/modules/0724-modules-flat-same-name-ambiguous.sx:10:19
|
||||
|
|
||||
10 | print("{}\n", dup());
|
||||
| ^^^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
caller1 binds d1.tag: ok
|
||||
caller2 binds d2.tag: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
from_a combine fixed: ok
|
||||
from_b combine variadic: ok
|
||||
from_a pick variadic: ok
|
||||
from_b pick fixed: ok
|
||||
1
examples/modules/expected/0727-modules-user-ns-m0.exit
Normal file
1
examples/modules/expected/0727-modules-user-ns-m0.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/modules/expected/0727-modules-user-ns-m0.stderr
Normal file
1
examples/modules/expected/0727-modules-user-ns-m0.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
examples/modules/expected/0727-modules-user-ns-m0.stdout
Normal file
3
examples/modules/expected/0727-modules-user-ns-m0.stdout
Normal file
@@ -0,0 +1,3 @@
|
||||
call_a binds a.ping: ok
|
||||
call_b binds b.ping: ok
|
||||
__m0.ping binds m.ping: ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from_a binds a.apply (value param): ok
|
||||
from_b binds b.apply (pointer param): ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
absval = 7
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from_a binds a.cfg default (10): ok
|
||||
from_b binds b.cfg default (20): ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
from_a closure binds a.pick (1): ok
|
||||
from_b closure binds b.pick (2): ok
|
||||
from_a fn-value binds a.pick (1): ok
|
||||
from_b fn-value binds b.pick (2): ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from_a v.bump() binds a.bump (+1): ok
|
||||
from_b v.bump() binds b.bump (+100): ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user