summaryrefslogtreecommitdiffstats
path: root/testsuite/dwz.tests/illegal-option.sh
blob: f767f4c91c2eb7d5b57d98c11d79e2533bb0fc87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cp $execs/hello 1

if dwz -x 1 2> dwz.err; status=$?; then
    true
fi

[ $status -eq 1 ]

grep -q ": invalid option -- 'x'" dwz.err
grep -q "Usage:" dwz.err

cmp 1 $execs/hello

if dwz --x 1 2> dwz.err; status=$?; then
    true
fi

[ $status -eq 1 ]

grep -q ": unrecognized option '--x'" dwz.err
grep -q "Usage:" dwz.err

cmp 1 $execs/hello

rm -f 1 dwz.err