File: nulldelta.sh

package info (click to toggle)
cssc 1.0.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,612 kB
  • ctags: 1,424
  • sloc: cpp: 13,502; sh: 4,759; ansic: 2,971; perl: 342; makefile: 339; awk: 11
file content (59 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (4)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /bin/sh

# flags.sh:  Testing for null deltas.

# Import common functions & definitions.
. ../common/test-common

g=new.txt
s=s.$g
p=p.$g
remove foo $s $g $p [zx].$g

###
### Tests for the 'v' flag; see also init-mrs.sh.
###

# Create SCCS file with a substituted keyword.
echo '%M%' >foo


###
### Tests for the n flag.
### 
# Create an SCCS file with the "n" flag turned on.
docommand n1 "${admin} -ifoo $s" 0 "" ""
docommand n2 "${admin} -fn $s" 0 "" ""

# Skip a release (2)
docommand n3 "${get} -e -r4 $s" 0 "1.1\nnew delta 4.1\n1 lines\n" \
   	    IGNORE
echo "hello" >> $g
docommand n4 "${delta} -y $s" 0 "4.1\n1 inserted\n0 deleted\n1 unchanged\n" ""



# Check that a null delta was made for release 2, at all.
docommand n5 "${prs} -r2.1 -d:I: $s" 0 "2.1\n" IGNORE

# Check that a null delta was made for release 3, at all.
docommand n6 "${prs} -r3.1 -d:I: $s" 0 "3.1\n" IGNORE

## TODO: also ceck the deltas are in the right order.

# Check some details about that release.  The comment is 
# "AUTO NULL DELTA", no deltas were included or excluded;
# one delta was ignored; the predecessor sequence number must be 1; 
# the sequence number of this delta must be 2, and the type must be 'D',
# that is, a normal delta.
docommand n7 "${prs} -r2.1 '-d:C:|:DI:|:DP:|:DS:|:DT:' $s" 0 \
  'AUTO NULL DELTA\n||1|2|D\n' IGNORE

###
### Cleanup and exit.
###
rm -rf test 
remove foo $s $g $p [zx].$g command.log

success