CRAM test is runnable on Windows Powershell and CMD
(❌ means present in craM but not in craW yet)
- ✅ Basic interpretation of .t and generation of corresponding .err
- ✅ Powershell support (
--shell=powershell, - ✅ CMD Support (
--shell=cmd, - ✅ Sandboxed Testing Guide
- ✅ Promotion from .err to .t
-i -yflags (-yAnd-iare not supported in isolation) - ✅ Cram env variables (duplicated as Powershell env items and appropriate variables)
- ✅ ‘Test Framework behavior’, i.e. non-zero return code and different display when .err is different from .t
- ✅ Display error code after command if not null
- Regular expression for expected output
- ❌ Option configuration via .cramrc
- ❌ Configure options via CRAM env variable
- ❌ Full options and flags from CRAM (if not relevant then at least detected and noted)
Usage: craw.py [OPTIONS] TESTS...
OPTIONS:
-h, --help show this help message and exit
-i, --interactive interactively merge changed test output
-y, --yes answer yes to all questions
--promote equivalent to -i -y: accept all changed test output
--keep-tmpdir keep temporary directories
--shell=cmd shell to use for running tests (default: powershell)
Non indented lines are just comments
Lines starting with ' $ ' are shell commands
Lines starting with ' ' are the expected output of the shell commands above
$ echo Youpi
Youpi
$ echo Content > test.txt
$ cat test.txt
Content
The env variable TESTDIR is set to the directory from which craw is executed
$ cat $TESTDIR/test_resource.txt
Lorem ipsum
If the shell command ends up failing, it's exit code is displayed between brackets after the command output
(here we swallow the error message to avoid flakiness of paths and windows error messages translation)
$ cat non_existing_file.txt 2> swallow_error_message
[False]
make testTo test the crawl yourselfmake typecheckTo ensure soundness of type
Test covers end-to-end .t The files were run by crow only.
Future work may require a unittest harness for more involved testing (property testing, fuzzing or error handling would likely go there).
<a href