test: add dynamic test discovery and validity checks.

Modified benchmark_test.go to dynamically discover all .test files in the
tests directory instead of using hardcoded paths.
Added TestSamplesValidity integration test that validates each test file
against its corresponding .expected file.
Added runSampleWithOutput helper function to capture interpreter output.
Added new test cases with expected outputs for validation.
This commit is contained in:
2026-01-12 20:04:00 -05:00
parent 588f4cd521
commit 4a5c424e54
13 changed files with 113 additions and 26 deletions

8
go.mod
View File

@@ -1,3 +1,11 @@
module git.maximhutz.com/max/lambda
go 1.25.5
require github.com/stretchr/testify v1.11.1
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)