diff options
author | axel <axel@liljencrantz.se> | 2005-09-20 23:31:55 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-09-20 23:31:55 +1000 |
commit | 7ddecde54372c25fcf526e2d24807c5dac9800aa (patch) | |
tree | 1bff6e0ccd096836adb74529d53a6debcf45375b /tests/test.fish | |
parent | 149594f974350bb364a76c73b91b1d5ffddaa1fa (diff) |
Add subdirectories
darcs-hash:20050920133155-ac50b-9a14c6c664dd03afbe8e15e7c7998fcfb5c3c750.gz
Diffstat (limited to 'tests/test.fish')
-rwxr-xr-x | tests/test.fish | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/test.fish b/tests/test.fish new file mode 100755 index 00000000..082db468 --- /dev/null +++ b/tests/test.fish @@ -0,0 +1,42 @@ +#!/usr/local/bin/fish +# +# Main loop of the test suite. I wrote this +# instad of using autotest to provide additional +# testing for fish. :-) + +echo Testing high level script functionality + +for i in *.in + set template_out (basename $i .in).out + set template_err (basename $i .in).err + set template_status (basename $i .in).status + + ../fish <$i >tmp.out ^tmp.err + echo $status >tmp.status + set res ok + if diff tmp.out $template_out >/dev/null + else + set res fail + echo Output differs for file $i + end + + if diff tmp.err $template_err >/dev/null + else + set res fail + echo Error output differs for file $i + end + + if test (cat tmp.status) = (cat $template_status) + else + set res fail + echo Exit status differs for file $i + end + + if test $res = ok; + echo File $i tested ok + else + echo File $i failed tests + end; + +end + |