File: check_iso.sh.in

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 (80 lines) | stat: -rwxr-xr-x 2,121 bytes parent folder | download | duplicates (4)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!@SHELL@

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@EXEEXT@ ; then
  exit 77
fi

BASE=$(basename $0 .sh)
fname=copying

opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
test_iso_info  "$opts" ${fname}.dump ${srcdir}/${fname}.right
RC=$?
check_result $RC 'iso-info basic test' "$ISO_INFO $opts"

opts="--ignore --image ${srcdir}/data/${fname}.iso --extract $fname "
test_iso_read  "$opts" ${fname} ${srcdir}/copying.gpl
RC=$?
check_result $RC 'iso-read basic test' "$ISO_READ $opts"

if test -n "@HAVE_ROCK@"; then
  fname=copying-rr
  if test -n "@MINGW32@"; then
      right_file=${fname}-mingw.right
  else
      right_file=${fname}.right
  fi
  opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
  test_iso_info  "$opts" ${fname}.dump ${srcdir}/${right_file}
  RC=$?
  check_result $RC 'iso-info Rock Ridge test' "$ISO_INFO $opts"

  opts="--image ${srcdir}/data/${fname}.iso --extract COPYING"
  test_iso_read  "$opts" ${fname} ${srcdir}/copying-rr.gpl
  RC=$?
  check_result $RC 'iso-read RR test' "$ISO_READ $opts"
fi

if test -n "@HAVE_JOLIET@" ; then
  BASE=$(basename $0 .sh)
  fname=joliet
  opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 "
  test_iso_info  "$opts" ${fname}-nojoliet.dump ${srcdir}/${fname}.right
  RC=$?
  check_result $RC 'iso-info Joliet test' "$cmdline"
  opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 --no-joliet "
  test_iso_info  "$opts" ${fname}-nojoliet.dump \
                 ${srcdir}/${fname}-nojoliet.right
  RC=$?
  check_result $RC 'iso-info --no-joliet test' "$cmdline"
fi

for fname in malformed malformed2; do
    opts="--quiet ${srcdir}/data/${fname}.iso -f "
    test_iso_info  "$opts" ${fname}.dump ${srcdir}/${fname}.right
    BAD_RC=$?
    if test $BAD_RC -ne  0 ; then
	check_result 0 "iso-info $fname test" "$cmdline"
    else
	echo "$0: in $fname Expecting nonzero return"
	RC=1
    fi
done


exit $RC

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