File: _test_parse_badargs.test

package info (click to toggle)
sphinxbase 0.8%2B5prealpha-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,592 kB
  • ctags: 3,296
  • sloc: ansic: 29,950; sh: 11,802; makefile: 679; python: 335; perl: 121; yacc: 93; lex: 50
file content (14 lines) | stat: -rwxr-xr-x 458 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
. ../testfuncs.sh

set -e
testname=`basename $0 .test`

./cmdln_parse -a foobar > $testname.out 2>&1 && exit 1
./cmdln_parse -a 42 -noarg >> $testname.out 2>&1 && exit 1
./cmdln_parse -a 42 -c >> $testname.out 2>&1 && exit 1

sed -ne 's,^ERROR:.*line [0-9]*:,ERROR:,p' < $testname.out > $testname.tmp.out \
    && mv $testname.tmp.out $testname.out
compare_table defaults $testname.out $tests/unit/test_cmdln/$testname.res 100
#rm -f $testname.out