[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-cssc] Changes needed to make CSSC-1.3.1 tests work with SCCS
From: |
Joerg Schilling |
Subject: |
[Bug-cssc] Changes needed to make CSSC-1.3.1 tests work with SCCS |
Date: |
Sat, 28 May 2011 13:17:45 +0200 |
User-agent: |
nail 11.22 3/20/05 |
Hi,
in order to change as few things as possible. I recommend this setup:
TESTING_CSSC=false
TESTING_REAL_CSSC=false
TESTING_REAL_SCCS=false
if ( ${admin} -V 2>&1 ; echo xxx ) 2>/dev/null | grep CSSC >/dev/null
then
TESTING_CSSC=true
TESTING_REAL_CSSC=true
fi
if ( ${admin} -V 2>&1 ; echo xxx ) 2>/dev/null | grep SCCS >/dev/null
then
if test ".$CSSC_ONLY" = ".true"
then
:
else
TESTING_CSSC=true
fi
TESTING_REAL_SCCS=true
fi
Here is the patch to make the tests work with SCCS and to detect the current
CSSC
binary bug:
------- ./admin/r-option.sh -------
--- /tmp/sccs.FEaqTX 2011-05-28 13:03:12 +0200
+++ ./admin/r-option.sh 2011-05-27 14:54:13 +0200
@@ -56,11 +56,12 @@
docommand t4 "${prs} -d:I: $s" 0 "1.2.2.1\n" ""
- # The -r option must be accompanied by the -i option.
- # Using the -n option just isn't enough.
+ # The -r option must be accompanied by the -i or -n option.
remove $g $s
echo "%M%" > $g
- docommand t5 "${admin} -n -r2 $s" 1 "" IGNORE
+ docommand t5a "${admin} -i$g -r2 $s" 0 "" IGNORE
+ remove $s
+ docommand t5b "${admin} -n -r2 $s" 0 "" IGNORE
else
echo Tests t1-t5 have been skipped
------- ./admin/y-flag.sh -------
--- /tmp/sccs.GEaqTX 2011-05-28 13:03:12 +0200
+++ ./admin/y-flag.sh 2011-05-27 18:43:46 +0200
@@ -18,7 +18,7 @@
# Figure out if we should expect the thing to work.
if ${admin} -n -i/dev/null -fyM "${s}" >/dev/null 2>&1 || $TESTING_CSSC
then
- test -e "${s}" || miscarry "admin program '${admin}' silently did nothing"
+ test -r "${s}" || miscarry "admin program '${admin}' silently did nothing"
echo "We are testing an SCCS implementation that supports the y flag.
Good."
remove "${s}"
else
@@ -46,7 +46,7 @@
12 W %W%
EOF
test -r foo || miscarry cannot create file foo.
-test -e "${s}" && miscarry initial conditions were incorrectly set up
+test -r "${s}" && miscarry initial conditions were incorrectly set up
docommand Y1 "${admin} -ifoo ${s}" 0 "" IGNORE
remove foo
------- ./binary/auto.sh -------
--- /tmp/sccs.HEaqTX 2011-05-28 13:03:12 +0200
+++ ./binary/auto.sh 2011-05-27 14:28:23 +0200
@@ -108,7 +108,8 @@
then
## Real SCCS fails on these inputs:-
test_bin fb10 "foo" # no newline at end of file.
- test_ascii fa11 "x\000y\n" # ASCII NUL.
+ test_bin fa11 "x\000y\n" # ASCII NUL.
+ test_ascii fa12 "x\001y\n" # ASCII SOH.
else
echo "Some tests skipped (since SCCS fails them but CSSC should pass)"
fi
------- ./binary/seeking.sh -------
--- /tmp/sccs.IEaqTX 2011-05-28 13:03:12 +0200
+++ ./binary/seeking.sh 2011-05-27 14:42:35 +0200
@@ -148,7 +148,7 @@
-if ( ${admin} -V 2>&1 ; echo umsp ) | grep CSSC >/dev/null
+if $TESTING_CSSC
then
# Do the tests that SCCS does not pass.
use_stdin=false
------- ./year-2000/ext.sh -------
--- /tmp/sccs.JEaqTX 2011-05-28 13:03:12 +0200
+++ ./year-2000/ext.sh 2011-05-27 16:58:36 +0200
@@ -26,8 +26,9 @@
allrevs="${r1_5}${r1_4}${r1_3}${r1_2}${r1_1}"
-if "$TESTING_CSSC"
+if "$TESTING_REAL_CSSC"
then
+ echo Testing the CSSC century specifier.
## Tests for the century field.
# Ask for exerything after the end of 1968. Since the first
@@ -47,9 +48,34 @@
else
- echo No testing done for century specifier.
+ echo No testing done for CSSC century specifier.
fi
+if "$TESTING_REAL_SCCS"
+then
+ echo Testing the SCCS century specifier.
+ ## Tests for the century field.
+
+ # Ask for exerything after the end of 1968. Since the first
+ # year we have int he s. file is 1969, we should get everything.
+ docommand c1 "${vg_prs} ${brief} -l -c1968/1231235959 $s" 0 \
+ "${allrevs}" ""
+
+ # Ask for exerything before the end of 1968. Since the first
+ # year we have int he s. file is 1969, we should get NOTHING.
+ docommand c2 "${vg_prs} ${brief} -e -c1968/1231235959 $s" 0 \
+ "" ""
+
+ # Ask for exerything before the end of 2069.
+ # We chould get everything.
+ docommand c3 "${vg_prs} ${brief} -e -c2069/1231235959 $s" 0 \
+ "${allrevs}" ""
+
+
+else
+ echo No testing done for SCCS century specifier.
+fi
+
remove command.log
success
Jörg
--
EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
address@hidden (uni)
address@hidden (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-cssc] Changes needed to make CSSC-1.3.1 tests work with SCCS,
Joerg Schilling <=