commit ba9f776d658f090cbb611a411e1394289930e0a5 parent 8e4ccaa7eeaadf4c3d5a43c289021ff306bdbd11 Author: Ryan Sepassi <rsepassi@gmail.com> Date: Sat, 25 Apr 2026 16:15:43 -0700 argv test Diffstat:
| A | tests/scheme1/40-argv.expected-exit | | | 1 | + |
| A | tests/scheme1/40-argv.scm | | | 6 | ++++++ |
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tests/scheme1/40-argv.expected-exit b/tests/scheme1/40-argv.expected-exit @@ -0,0 +1 @@ +2 diff --git a/tests/scheme1/40-argv.scm b/tests/scheme1/40-argv.scm @@ -0,0 +1,6 @@ +; Verify the prelude's (argv) and (exit n) wrappers. argv[0] is the +; program name, argv[1] is this script. Exit with the entry count so +; the runner can diff it against expected-exit. +(define (count xs) + (if (null? xs) 0 (+ 1 (count (cdr xs))))) +(exit (count (argv)))