Debian Codegraph @

testsuite/lid-radix

raw symbols SCIP
1 #!/bin/sh
2 # Demonstrate how lid's -o, -d and -x options work
3
4 # Copyright (C) 2011-2020 Free Software Foundation, Inc.
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 . "${srcdir=.}/init.sh"; path_prepend_ ../src
20
21 echo 255 > d.txt || framework_failure_
22 echo 0255 >d2.txt || framework_failure_
23 echo 0377 > o.txt || framework_failure_
24 echo 377 > o2.txt || framework_failure_
25 echo 0xff > x.txt || framework_failure_
26 echo ff > x2.txt || framework_failure_
27
28 echo '*.txt text' > map || framework_failure_
29
30 mkid -m map || framework_failure_
31
32 cat <<EOF > exp.all
33 d.txt
34 o.txt
35 x.txt
36 EOF
37
38 for i in d o x; do
39 echo $i.txt > exp.$i || framework_failure_
40 done
41
42 lid --key=none 0xff > out || fail=1
43 compare exp.all out || fail=1
44
45 for i in d o x; do
46 lid --key=none -$i 0xff > out || fail=1
47 compare exp.$i out || fail=1
48 done
49
50 Exit $fail