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:
15
examples/errors/1031-errors-process-exit.sx
Normal file
15
examples/errors/1031-errors-process-exit.sx
Normal file
@@ -0,0 +1,15 @@
|
||||
// `process.exit` (ERR step E4.1): immediate process termination with an exit
|
||||
// code. No `defer` / `onfail` cleanup runs and no error-trace frames are pushed
|
||||
// — it's POSIX `_exit(2)`. Here a runtime call exits 42; the line after never
|
||||
// runs. (sx `print` writes unbuffered via `write(2)`, so the "starting" line
|
||||
// still appears despite `_exit` skipping the stdio flush.) Expected exit: 42.
|
||||
|
||||
#import "modules/std.sx";
|
||||
proc :: #import "modules/std/process.sx";
|
||||
|
||||
main :: () -> i32 {
|
||||
print("starting\n");
|
||||
proc.exit(42);
|
||||
print("unreachable\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user