Open andychu opened 2 years ago
on your wiki: "OSH Test Framework"
Also I looked into the TAP protocol
Would be nice to combine with our Python tests perhaps?
Actually ShellSpec has this DSL, it looks very elaborate
https://github.com/shellspec/shellspec#syntax-formatter-altshfmt
And appears to do code generation
I would like something that is in OSH syntax though. After we implement Oil blocks #631 I should ask the maintainer about it
I realized with the new typed args we can do something like
assert (status === 2)
assert (stdout === $'hello\n')
assert (stdout === '''
hello
''')
expect (status === 2)
Although I think we shouldn't clobber the "expect" tool. TODO: see what other test frameworks use
Re-read this article: https://thomaslevine.com/computing/shell-testing/
depends on #631
Problem: for some legacy scripts, it would be useful to use a compatible shell test framework, not an incompatible one.
Possible solution: generate a shell script that's equivalent! or run it directly.
Hence running sharness, etc. which is #946
that seemed like the most promising one