File: defsid.sh

package info (click to toggle)
cssc 0.14alpha.pl0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,796 kB
  • ctags: 1,404
  • sloc: cpp: 12,927; sh: 3,617; ansic: 3,000; perl: 342; makefile: 334; awk: 11
file content (55 lines) | stat: -rw-r--r-- 1,278 bytes parent folder | download
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
#! /bin/sh
# defsid.sh:  Tests for the "d" (default sid) flag.

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

remove command.log 

g=brtest
s=s.$g
z=z.$g
x=x.$g
p=p.$g
remove [zxsp].$g $g

# Create the s. file and make sure it exists.
remove $g
echo "%M%" > $g
docommand d1 "$admin -n -i$g $s" 0 "" IGNORE
remove $g

# Create a second revision.
docommand d2 "$get -e $s" 0 "1.1\nnew delta 1.2\n1 lines\n" ""

# Check the file in to leave the branch in place.
docommand d3 "$delta -yNoComment $s" 0 "1.2\n0 inserted\n0 deleted\n1 unchanged\n" ""

# Make a branch at the same place, and check the resulting SID.
docommand d4 "$get -e -r1.1 $s" 0 "1.1\nnew delta 1.1.1.1\n1 lines\n" ""
docommand d5 "$delta -yNoComment $s" 0 "1.1.1.1\n0 inserted\n0 deleted\n1 unchanged\n" ""


# Set the default-sid flag.
docommand d6 "$admin -fd1.1 $s" 0 "" ""

# Make sure we select that SID.
docommand d7 "$get -g $s" 0 "1.1\n" ""


# Change the default-sid flag.
docommand d8 "$admin -fd1.1.1.1 $s" 0 "" ""

# Make sure we select that SID.
docommand d9 "$get -g $s" 0 "1.1.1.1\n" ""

# Delete the flag.
docommand d10 "$admin -dd $s" 0 "" ""

# Make sure we select the right SID now..
docommand d11 "$get -g $s" 0 "1.2\n" ""

remove [zxsp].$g $g
remove command.log
success