1#! /bin/sh
2# removed-delta.sh:  Tests for behavious when a delta has been removed.
3
4# Import common functions & definitions.
5. ../../common/test-common
6
7
8g=X
9s=s.$g
10x=x.$g
11z=z.$g
12p=p.$g
13
14remove $g $s $x $z $p
15
16
17# Create an SCCS file with two deltas 1.1 and 2.1; then remove
18# the 2.1 delta with rmdel - getting the 1.1 revision for editing
19# should result in SID 2.1 being re-used.
20#
21# CSSC used not to do that - SourceForge bug number #450900.
22
23docommand rd1 "${admin} -n $s" 0 IGNORE IGNORE
24docommand rd2 "${vg_get} -r2 -e $s"   0 "1.1
25new delta 2.1
260 lines
27" IGNORE
28
29docommand rd3 "${delta} -yNoComment $s"   0 IGNORE IGNORE
30docommand rd4 "${rmdel} -r2.1 $s"         0 IGNORE IGNORE
31
32# It's the second get -e which we exp[ect to fail if we are
33# suffering from SourceForge bug number #450900.
34docommand rd5 "${vg_get} -r2 -e $s"   0 "1.1
35new delta 2.1
360 lines
37" IGNORE
38
39
40
41###
42### Now we re-do the whole test again, with two removed deltas,
43### to see if that makes a difference.
44remove $g $s $x $z $p
45
46docommand rd10 "${admin} -n $s" 0 IGNORE IGNORE
47docommand rd11 "${vg_get} -r2 -e $s"   0 "1.1
48new delta 2.1
490 lines
50" IGNORE
51
52docommand rd12 "${delta} -yNoComment $s"   0 IGNORE IGNORE
53
54docommand rd13 "${vg_get} -r2.1 -e $s"   0 "2.1
55new delta 2.2
560 lines
57" IGNORE
58
59docommand rd14 "${delta} -yNoComment $s"   0 IGNORE IGNORE
60
61
62docommand rd15 "${rmdel} -r2.2 $s"         0 IGNORE IGNORE
63docommand rd16 "${rmdel} -r2.1 $s"         0 IGNORE IGNORE
64
65docommand rd17 "${vg_get} -r2 -e $s"   0 "1.1
66new delta 2.1
670 lines
68" IGNORE
69
70
71
72remove $g $s $x $z $p
73success
74