blob: ac701f77a4767274c239cdbf345b95421ace40e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
[ -f testing.sh ] && . testing.sh
#testing "name" "command" "result" "infile" "stdin"
cat >file1 <<EOF
line1
line2
EOF
# For non-tty output, headers are shown even if there's only one file.
testing "non-tty" "more file1 | cat -" "::::::::::::::\nfile1\n::::::::::::::\nline1\nline2\n" "" ""
testing "directory" "more ." "\n*** .: directory ***\n\n" "" ""
rm file1
|