more.test 382 B

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