| name | add-test-fixture |
| description | Create a file-based integration test (.spy + .expected/.error pair) |
| argument-hint | <description of test> |
Create a new file-based integration test in src/Sharpy.Compiler.Tests/Integration/TestFixtures/.
File formats
- Success test:
category/test_name.spy + category/test_name.expected (exact stdout match)
- Error test:
category/test_name.spy + category/test_name.error (substring match in error output)
- Warning test:
category/test_name.warning (empty = no warnings, non-empty lines = expected substrings)
- Skip: Add a
.skip file to disable a test
Existing categories
List dynamically:
ls -d src/Sharpy.Compiler.Tests/Integration/TestFixtures/*/ | xargs -I{} basename {}
Steps
- Pick the appropriate category (or create a new one if none fits)
- Write the
.spy file testing one feature, kept minimal
- Write the
.expected or .error file
- Run:
dotnet test --filter "DisplayName~test_name" to verify