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
# basic.sh: Tests for the basic operation of "rmdel".
# Import common functions & definitions.
. ../common/test-common
g=testfile.txt
s=s.$g
d=d.$g
z=z.$g
x=x.$g
p=p.$g
remove command.log log log.stdout log.stderr $g $s $z $x $p $d q.$g
remove $g
echo "hello, this is a test file" > $g
# Prepare an SCCS file with two revisions.
docommand a1 "${admin} -i${g} $s" 0 "" IGNORE
remove $g
docommand a2 "${get} -e $s" 0 "1.1\nnew delta 1.2\n1 lines\n" ""
docommand a3 "${delta} -yNoComment $s" 0 \
"1.2\n0 inserted\n0 deleted\n1 unchanged\n" \
IGNORE
# Remove the second revision.
docommand a4 "${rmdel} -r1.2 $s" 0 "" ""
# Now get the first revision and check it still contains the right data.
# CSSC had a bug in 0.06alpha-pl3 (and earlier), where the delta control
# lines ^AI, ^AE etc. were all deleted. Bug reported by Peter Kjellerstedt.
docommand a5 "${get} -r1.1 -p $s" 0 "hello, this is a test file\n" IGNORE
# Make sure that the revision we tried to remove is actually now absent.
docommand a6 "${get} -r1.2 -p $s" 1 "" IGNORE
remove command.log log log.stdout log.stderr $g $s $z $x $p $d
success
|