File: check_bad_iso.sh

package info (click to toggle)
libcdio 2.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,140 kB
  • sloc: ansic: 39,407; cpp: 2,556; sh: 1,263; makefile: 826; yacc: 324; ruby: 116; perl: 34
file content (42 lines) | stat: -rwxr-xr-x 719 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

if test -z $srcdir ; then
  srcdir=$(pwd)
fi

if test "X$top_builddir" = "X" ; then
  top_builddir=$(pwd)/..
fi

. ${top_builddir}/test/check_common_fn

if test ! -x ../src/iso-info ; then
  exit 77
fi

BASE=$(basename $0 .sh)
fname=bad-dir

RC=0

opts="--quiet ${srcdir}/../test/data/${fname}.iso"
cmdname=iso-info
cmd=../src/iso-info
if ! "${cmd}" --quiet --no-header ${opts} 2>&1 ; then
    echo "$0: unexpected failure"
    RC=1
fi

opts="--quiet ${srcdir}/test/data/${fname}.iso --iso9660"
if "${cmd}" --no-header ${opts} 2>&1 ; then
    ((RC+=1))
else
    echo "$0: expected failure"
fi

exit $RC

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***