annotate scripts/test/cat.test @ 562:4d802d438983

Match uint64_t with PRIu64 to avoid warnings on 64 bit builds.
author Rob Landley <rob@landley.net>
date Sat, 14 Apr 2012 21:27:00 -0500
parents 7bdca139b03f
children 786841fdb1e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
285
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -f testing.sh ] && . testing.sh
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 #testing "name" "command" "result" "infile" "stdin"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
6
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 testing "cat" "cat && echo yes" "oneyes\n" "" "one"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 testing "cat file1" \
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 "cat /bin/cat > file1 && diff -u /bin/cat file1 && echo yes" \
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 "yes\n" "" ""
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 #testing "cat file1 file2" "cat /bin/cat file1 > file2 && diff -u -
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
12
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 testing "cat - file1" \
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 "cat - file1 | diff -a -U 0 - file1 | tail -n 1" \
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 "-hello\n" "" "hello\n"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
16
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 rm file1
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 #testing "cat file1 file2" "cat $0"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 #testing "cat - file"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 #testing "cat > /dev/full"
7bdca139b03f Very simple cat tests, with more test ideas commented out.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 #testing "cat file1 notfound file2"