xref: /freebsd/contrib/one-true-awk/testdir/T.flags (revision 19261079b74319502c6ffa1249920079f0f69a72)
1echo T.flags: test some commandline flags
2
3awk=${awk-../a.out}
4
5$awk >foo 2>&1
6grep '[Uu]sage' foo >/dev/null || echo 'T.flags: bad usage'
7
8$awk -f >foo 2>&1
9grep 'no program' foo >/dev/null || echo 'T.flags: bad no program'
10
11$awk -f glop/glop >foo 2>&1
12grep 'can.t open' foo >/dev/null || echo 'T.flags: bad can.t open program'
13
14$awk -fglop/glop >foo 2>&1
15grep 'can.t open' foo >/dev/null || echo 'T.flags: bad can.t open program 2'
16
17$awk -zz 'BEGIN{}' >foo 2>&1
18grep 'unknown option' foo >/dev/null || echo 'T.flags: bad unknown option'
19
20$awk -F  >foo 2>&1
21grep 'no field separator' foo >/dev/null || echo 'T.flags: bad missing field separator'
22
23$awk -F '' >foo 2>&1
24grep 'field separator FS is empty' foo >/dev/null || echo 'T.flags: bad empty field separator'
25