feat: run example files as tests to catch regressions like #266
Add a new `run_example` function that invokes the existing test runner with an `example=True` flag, and walk the `example/` and `example/import-module/` directories to execute all example files as tests. The `example` flag suppresses output comparison against expected lines, allowing examples that produce arbitrary output (or none) to pass without failure. Also comment out `foreign static bar` and `foreign baz(string)` in `example/syntax.wren` to prevent compilation errors when running it as a test.
This commit is contained in:
+2
-2
@@ -90,8 +90,8 @@ class ReservedWords is SyntaxExample {
|
||||
}
|
||||
|
||||
// `foreign`, `static`
|
||||
foreign static bar
|
||||
foreign baz(string)
|
||||
// foreign static bar
|
||||
// foreign baz(string)
|
||||
// (Remove lines above to make this file compile)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user