summaryrefslogtreecommitdiff
path: root/test/check_cue.sh.in
blob: 890d2e4209773c6858f15ec5c6c8565f958fa203 (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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/sh
# Tests to see that BIN/CUE and cdrdao TOC file iamge reading is correct
# (via cd-info).

if test ! -d "@VCDINFO_LIBS@" ; then
  vcd_opt='--no-vcd'
fi

if test ! -d "$abs_top_srcdir" ; then
  abs_top_srcdir=@abs_top_srcdir@
fi

if test ! -d "$top_builddir" ; then
  top_builddir=@abs_top_builddir@
fi

. ${top_builddir}/test/check_common_fn

CD_INFO=$abs_top_srcdir/src/cd-info 
if test ! -x $CD_INFO ; then
  exit 77
fi

BASE=`basename $0 .sh`

fname=cdda
testnum=CD-DA
opts="--quiet --no-device-info --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --no-cddb"
test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
RC=$?
check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"
  

opts="--quiet --no-device-info --bin-file ${abs_top_srcdir}/test/data/${fname}.bin --no-cddb"
test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
RC=$?
check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts"

opts="--quiet --no-device-info --toc-file ${abs_top_srcdir}/test/data/${fname}.toc --no-cddb"
test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
RC=$?
check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts"

fname=cdtext
testnum="CD-Text binary parser"
if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then
  if test -f ${abs_top_srcdir}/test/data/${fname}.cdt ; then
    opts="--quiet --no-device-info --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --no-cddb"
    test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
    RC=$?
    check_result $RC "cd-info CD-Text CUE test $testnum" "${CD_INFO} $opts"
  else
    echo "Don't see CD-Text file ${abs_top_srcdir}/test/data/${fname}.cdt. Test $testnum skipped."
  fi
else
  echo "Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped."
fi

fname=isofs-m1
testnum='ISO 9660 mode1 CUE'
if test -f  ${abs_top_srcdir}/test/data/${fname}.bin ; then
  if test -n "@HAVE_ROCK@"; then 
    opts="-q --no-device-info --no-disc-mode --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --iso9660"
    test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
    RC=$?
    check_result $RC "cd-info Rock-Ridge CUE test $testnum" "${CD_INFO} $opts"

    opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --iso9660"
    test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}-no-rr.right
    RC=$?
    check_result $RC "cd-info no Rock-Ridge CUE test $testnum" "${CD_INFO} $opts"
  fi

else 
  echo "Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped."
fi

if test -n "@HAVE_ROCK@"; then 
  testnum='ISO 9660 mode1 TOC'
  if test -f  ${abs_top_srcdir}/test/data/${fname}.bin ; then
    opts="-q --no-device-info --no-disc-mode --toc-file ${abs_top_srcdir}/test/data/${fname}.toc --iso9660"
    test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
    RC=$?
    check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts"
  else 
    echo "Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped."
  fi
fi

fname=vcd_demo
if test -z "@VCDINFO_LIBS@" ; then
  right=${abs_top_srcdir}/test/${fname}.right
else
  right=${abs_top_srcdir}/test/${fname}_vcdinfo.right
fi
testnum='Video CD'
if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then
  opts="-q --no-device-info --no-disc-mode -c ${abs_top_srcdir}/test/data/${fname}.cue --iso9660"
  test_cdinfo "$opts" ${fname}.dump $right
  RC=$?
  check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"

  if test -z "@VCDINFO_LIBS@" ; then
    right=${abs_top_srcdir}/test/${fname}.right
  else
    right=${abs_top_srcdir}/test/${fname}_vcdinfo.right
  fi
  opts="-q --no-device-info --no-disc-mode -t ${abs_top_srcdir}/test/data/${fname}.toc --iso9660"
  if test -f ${abs_top_srcdir}/test/${fname}.toc ; then
    test_cdinfo "$opts" ${fname}.dump $right
    RC=$?
    check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts"
  else 
    echo "Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.toc. Test $testnum skipped."
  fi
else 
  echo "Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped."
fi

fname=svcd_ogt_test_ntsc
testnum='Super Video CD'
if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then
  opts="-q --no-device-info --no-disc-mode --cue-file ${abs_top_srcdir}/test/data/${fname}.cue $vcd_opt --iso9660"
  test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right
  RC=$?
  check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts"
else 
  echo "Don't see CUE file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped."
fi

exit $RC

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