#
# @(#)dotests	1.2 20/06/24 Copyright 2020 J. Schilling
#
# Create the input file.
cat > $tdir$g <<EOF
%M%: This is a test file containing nothing interesting.
EOF


#
# Creating the s-file. 
#
# Create the s-file the traditional way...
docommand admin1 "${vg_sccs} admin -i$tdir$g $tdir$s" 0 \
    ""                                              IGNORE
docommand admin2 "test -f $tdir$S" 0 "" ""

remove $tdir$S

docommand create1 "${vg_sccs} create $tdir$g" 0 \
"
${tdir}tfile:
1.1
1 lines
"                                              IGNORE
docommand admin2 "test -f $tdir$S" 0 "" ""

remove $tdir,$g $tdir$g
docommand edit1 "${vg_sccs} edit $tdir$g" 0 \
"1.1
new delta 1.2
1 lines
"                                              IGNORE

if [ "$tdir" ]; then
docommand unedit1 "${vg_sccs} unedit $tdir$g" 0 \
"    ${tdir}tfile: removed
1.1
1 lines
"                                              IGNORE
else
docommand unedit1 "${vg_sccs} unedit $tdir$g" 0 \
"       tfile: removed
1.1
1 lines
"                                              IGNORE
fi
docommand edit2 "${vg_sccs} edit $tdir$g" 0 \
"1.1
new delta 1.2
1 lines
"                                              IGNORE
docommand tell1 "${vg_sccs} tell $tdir" 0 \
"tfile
"                                              IGNORE

echo another line >> $tdir$g
docommand diffs1 "${vg_sccs} diffs $tdir$g" 0 \
"
------- tfile -------
1a2
> another line
"                                              IGNORE

docommand delget1 "${vg_sccs} delget -ycomment $tdir$g" 0 \
"1.2
1 inserted
0 deleted
1 unchanged
1.2
2 lines
"                                              IGNORE

docommand sccsdiff1 "${vg_sccs} sccsdiff -r1.1 -r1.2 $tdir$g" 0 \
"
------- tfile -------
1a2
> another line
"                                              IGNORE

docommand prs1 "${vg_sccs} prs $tdir$g |sed -e 's,.*/s.tfile:,s.tfile:,' -e 's/D \(1\..\).*/D \1/' -e 's/created .*//'" 0 \
"s.tfile:

D 1.2
MRs:
COMMENTS:
comment

D 1.1
MRs:
COMMENTS:
date and time 

"                                              IGNORE

if [ $TESTING_SCCS_V6 ] && $TESTING_SCCS_V6 || [ "$SCCS_NMODE" = "i" ] || [ "$SCCS_NMODE" = "o" ]
then
docommand prt1 "${vg_sccs} prt $tdir$g |sed -e 's,.*/s.tfile:,s.tfile:,' -e 's/D \(1\..\).*/D \1/' -e 's/created .*//'" 0 \
"
s.tfile:

D 1.2
SIDext:	s 06350
comment

D 1.1
SIDext:	s 05131
date and time 
"                                              IGNORE
else
docommand prt1 "${vg_sccs} prt $tdir$g |sed -e 's,.*/s.tfile:,s.tfile:,' -e 's/D \(1\..\).*/D \1/' -e 's/created .*//'" 0 \
"
s.tfile:

D 1.2
comment

D 1.1
date and time 
"                                              IGNORE
fi

docommand log1 "${vg_sccs} log $tdir$g | sed -e 's/^[^	]* .*/date author/' -e 's/created .*//'" 0 \
"date author
	* tfile 1.2
	  comment

date author
	* tfile 1.1
	  date and time 

"                                              IGNORE

docommand fix1 "${vg_sccs} fix -r1.2 $tdir$g" 0 \
"1.2
2 lines
1.1
new delta 1.2
"                                              IGNORE

docommand delget2 "${vg_sccs} delget -ycomment2 $tdir$g" 0 \
IGNORE IGNORE

docommand clean1 "${vg_sccs} clean $tdir" 0 \
IGNORE IGNORE

docommand get1 "${vg_sccs} get -o $tdir$g" 0 \
IGNORE IGNORE

docommand branch1 "${vg_sccs} branch $tdir$g" 0 \
"1.2
new delta 1.3
2 lines
1.3
new delta 1.4
"                                                IGNORE

remove $S
remove $z $s $p $g SCCS/s.$g SCCS $output $error
