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