ssadler / hawk

Awk for Hoodlums
BSD 3-Clause "New" or "Revised" License
35 stars 2 forks source link

command-line doctest #33

Open gelisam opened 11 years ago

gelisam commented 11 years ago

We can't use doctest (nor hspec, I assume) to test the behaviour of the tool on the command-line. I volunteer to write a small doctest-like tool for that. For example, if I want to check that hawk has the following behaviour:

> hawk -e [1..3]
1
2
3
> seq 3 | hawk reverse
3
2
1

I would write the test exactly as above.