File: test_file.sh

package info (click to toggle)
argtable2 12-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,912 kB
  • sloc: sh: 9,083; ansic: 4,550; makefile: 106
file content (19 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

echo $0 TESTS BEGIN

#these tests should all return zero (parse succeeded)
./test_file --help || exit 1
./test_file       test_file.sh       test_file.sh   test_file.sh   .sh   || exit 1
./test_file     ./test_file.sh     ./test_file.sh   test_file.sh   .sh   || exit 1
./test_file   ././test_file.sh   ././test_file.sh   test_file.sh   .sh   || exit 1
./test_file ./././test_file.sh ./././test_file.sh   test_file.sh   .sh   || exit 1
./test_file       test_file          test_file      test_file      ''    || exit 1

#these tests should all return non-zero (parse failed)

./test_file && exit 1


echo "$0 TESTS PASSED"
echo "----------------------------------"