Skip to content

Add stdlib test suite with shell runner and CI integration#39

Open
mjohngreene wants to merge 3 commits intosigilante:masterfrom
mjohngreene:stdlib-expansion
Open

Add stdlib test suite with shell runner and CI integration#39
mjohngreene wants to merge 3 commits intosigilante:masterfrom
mjohngreene:stdlib-expansion

Conversation

@mjohngreene
Copy link
Contributor

Summary

  • Add test files for all 6 testable stdlib modules: prelude, list, math, option, result, string
  • Add tests/stdlib_test.sh shell runner that compares stdout against expected output
  • Add CI step in .github/workflows/ci.yml to run stdlib tests
  • Pin Cargo.lock dependencies for rustc 1.86.0-nightly compatibility

Each test file imports its module via use, defines a main function, and prints computed values one per line. The shell runner compares actual output against heredoc expected values and reports pass/fail.

Note: test_prelude.goth and test_math.goth define functions inline as workarounds for parser reserved keyword conflicts (Gamma, Pi).

Test plan

  • All 6 module tests pass locally (6/6)
  • CI workflow runs stdlib_test.sh successfully

🤖 Generated with Claude Code

mjohngreene and others added 3 commits January 31, 2026 17:25
Test 6 stdlib modules (prelude, list, math, option, result, string)
with .goth test files that exercise key functions and a shell runner
that compares output against expected values. Prelude and math tests
define functions inline due to pre-existing parse errors from reserved
keyword conflicts (round, pi).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ncies

Update test_option.goth and test_result.goth to use the new generic
stdlib API names (some/none/ok/err instead of someI/noneI/okII/errII).
Update expected outputs in stdlib_test.sh accordingly. Pin Cargo.lock
dependencies for compatibility with rustc 1.86.0-nightly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 tests across 9 sections covering expression evaluation, file execution,
multi-argument programs, parse/AST/type-check modes, JSON workflow,
no-main mode, and error handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant