--no-header omits warranty. Patch from Martin von Gagem. Savannah #29307.

This commit is contained in:
R. Bernstein
2011-10-04 04:28:36 -04:00
parent 6d907afff7
commit dced0a55c4
29 changed files with 58 additions and 157 deletions

View File

@@ -51,15 +51,16 @@ print_version (char *program_name, const char *version,
int no_header, bool version_only)
{
if (no_header == 0)
if (no_header == 0) {
report( stdout,
"%s version %s\nCopyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein\n",
program_name, version);
report( stdout,
_("This is free software; see the source for copying conditions.\n\
report( stdout,
_("This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n\
"));
}
if (version_only) {
char *default_device;

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DA

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
0x0000: 0000 0000 0000 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DA

View File

@@ -46,75 +46,56 @@ check_result() {
fi
}
test_cdinfo() {
test_common() {
opts="$1"
outfile="$2"
rightfile="$3"
cmdname="$1"
cmd="../src/${cmdname}@EXEEXT@"
opts="$2"
outfile="$3"
rightfile="$4"
CD_INFO="../src/cd-info@EXEEXT@"
if [ ! -x ${CD_INFO} ]; then
echo "$0: No ${CD_INFO}"
if [ ! -x "${cmd}" ]; then
echo "$0: No ${cmd}"
return 1
fi
if ${CD_INFO} --no-header ${opts} >${outfile} 2>&1 ; then
cmdline="${cmd}"
if "${cmd}" --no-header ${opts} >"${outfile}" 2>&1 ; then
if test "@DIFF@" != no; then
if @DIFF@ @DIFF_OPTS@ ${outfile} ${rightfile} ; then
rm -f $outfile
if @DIFF@ @DIFF_OPTS@ "${outfile}" "${rightfile}" ; then
rm -f "${outfile}"
return 0
else
return 3
fi
else
echo "$0: No diff(1) or cmp(1) found - cannot test ${CD_INFO}"
rm -f $outfile
return 77
echo "$0: No diff(1) or cmp(1) found - cannot test ${cmdname}"
rm -f "${outfile}"
return $SKIP_TEST_EXITCODE
fi
else
echo "$0 failed running: ${CD_INFO} ${opts}"
echo "$0 failed running: ${cmdname} ${opts}"
return 2
fi
}
test_cdinfo() {
test_common cd-info "$@"
}
test_iso_info() {
test_common iso-info "$@"
}
opts="$1"
outfile="$2"
rightfile="$3"
ISO_INFO="../src/iso-info@EXEEXT@"
if [ ! -x ${ISO_INFO} ]; then
echo "$0: No ${ISO_INFO}"
return 1
fi
cmdline="${ISO_INFO} --no-header ${opts}"
if $cmdline >${outfile} 2>&1 ; then
if test "/usr/bin/diff" != no; then
if @DIFF@ @DIFF_OPTS@ ${outfile} ${rightfile} ; then
rm -f $outfile
return 0
else
return 3
fi
else
echo "$0: No diff(1) or cmp(1 found - cannot test ${ISO_INFO}"
rm -f $outfile
return 77
fi
else
echo "$0 failed running: $cmdline"
return 2
fi
test_cd_read() {
test_common cd-read "$@"
}
test_iso_read() {
# not test_common, as we use an output file not stdout.
opts="$1"
outfile="$2"
rightfile="$3"
@@ -126,17 +107,17 @@ test_iso_read() {
return 1
fi
if ${ISO_READ} ${opts} -o ${outfile} 2>&1 ; then
if "${ISO_READ}" ${opts} -o "${outfile}" 2>&1 ; then
if test "@DIFF@" != no; then
if @DIFF@ @DIFF_OPTS@ ${outfile} ${rightfile} ; then
rm -f $outfile
if @DIFF@ @DIFF_OPTS@ "${outfile}" "${rightfile}" ; then
rm -f "${outfile}"
return 0
else
return 3
fi
else
echo "$0: No diff(1) or cmp(1 found - cannot test ${ISO_READ}"
rm -f $outfile
echo "$0: No diff(1) or cmp(1) found - cannot test ${ISO_READ}"
rm -f "${outfile}"
return 77
fi
else
@@ -146,36 +127,31 @@ test_iso_read() {
}
test_cd_read() {
test_legal_header() {
opts="$1"
outfile="$2"
rightfile="$3"
cmdname="$1"
cmd="../src/${cmdname}@EXEEXT@"
opts="$2"
outfile="$3"
CD_READ="../src/cd-read@EXEEXT@"
if [ ! -x ${CD_READ} ]; then
echo "$0: No ${CD_READ}"
return 1
if test "@GREP@" == no; then
echo "$0: No grep(1) found - cannot test ${cmd}."
echo "$0: Legal header test skipped."
exit $SKIP_TEST_EXITCODE
fi
if ${CD_READ} --no-header ${opts} >${outfile} 2>&1 ; then
if test "@DIFF@" != no; then
if @DIFF@ @DIFF_OPTS@ ${outfile} ${rightfile} ; then
rm -f $outfile
return 0
else
return 3
fi
else
echo "$0: No diff(1) or cmp(1 found - cannot test ${CD_READ}"
rm -f $outfile
return 77
"${cmd}" ${opts} > ${outfile} 2>&1
while read line; do
if ! grep -q "${line}" ${outfile}; then
echo "$0: Legal header test failed due to missing expected line:"
echo " ${line}"
echo "$0: Failed command:"
echo " ${cmd} ${opts}"
rm -f "${outfile}"
exit 4
fi
else
echo "$0 failed running: ${CD_READ} ${opts}"
return 2
fi
done < ${srcdir}/check_legal.regex
rm -f ${outfile}
echo "$0: Legal header of ${cmd} ${opts} ok."
}

View File

@@ -29,6 +29,8 @@ for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '--no-ioctl' \
i=`expr $i + 1`
done
test_legal_header cd-info "${srcdir}/data/${fname}.cue" cd-info_legal.dump
exit $RC
#;;; Local Variables: ***

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD-DATA (Mode 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO-9660 Information
/:

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO-9660 Information
/:

View File

@@ -1,7 +1,4 @@
CD Info 2.0 | (c) 2003 Gerd Knorr, Heiko Ei<45>feldt & R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 1)
#: MSF LSN Type

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
0x0000: 0909 2020 2020 474e 5520 4745 4e45 5241 .. GNU GENERA
0x0010: 4c20 5055 424c 4943 204c 4943 454e 5345 L PUBLIC LICENSE
0x0020: 0a09 0920 2020 2020 2020 5665 7273 696f ... Versio

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 1)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO-9660 Information
/:

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO-9660 Information
/:

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD DATA (Mode 2)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 2)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD DATA (Mode 2)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 3)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 3)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
CD-ROM Track List (1 - 3)

View File

@@ -1,6 +1,3 @@
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
Disc mode is listed as: CD DATA (Mode 2)