Mercurial > hg > toybox
view scripts/test/cat.test @ 513:8dc4aced2ffc
Added tag 0.2.1 for changeset 9bcc288a1c54
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 03 Mar 2012 18:17:26 -0600 |
parents | 7bdca139b03f |
children | 786841fdb1e0 |
line wrap: on
line source
#!/bin/bash [ -f testing.sh ] && . testing.sh #testing "name" "command" "result" "infile" "stdin" testing "cat" "cat && echo yes" "oneyes\n" "" "one" testing "cat file1" \ "cat /bin/cat > file1 && diff -u /bin/cat file1 && echo yes" \ "yes\n" "" "" #testing "cat file1 file2" "cat /bin/cat file1 > file2 && diff -u - testing "cat - file1" \ "cat - file1 | diff -a -U 0 - file1 | tail -n 1" \ "-hello\n" "" "hello\n" rm file1 #testing "cat file1 file2" "cat $0" #testing "cat - file" #testing "cat > /dev/full" #testing "cat file1 notfound file2"