cram
cram copied to clipboard
Read arguments from a script instead of stdin
If a program under test reads stdin (e.g. by accident), then cram's current behavior can be a little confusing, since what will happen is that it'll omit running anything because the script has been read.
For example, if your test file is
$ echo 123
123
$ cat > /dev/null
$ echo 456
456
$ echo 789
789
Then running it yields:
$ echo 123
123
$ cat > /dev/null
$ echo 456
- 456
- $ echo 789
- 789
This patch updates cram to pass the script via file instead, which makes
this mistake harder to make. I've also updated one of the tests that was
implicitly relying on this (debug.t).