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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
#! /bin/sh
# excl_ig_2.sh: More tests for exclusions and ignores.
# Import common functions & definitions.
. ../common/test-common
g=foo
s=s.$g
x=x.$g
z=z.$g
p=p.$g
files="$g $s $x $z $p"
remove $files
do_change() {
baselabel="$1"; shift
docommand ${baselabel}.0 "${vg_get} -e $s" 0 IGNORE IGNORE
for sedcmd
do
rename $g $g.old
remove $g.sed
echo "$sedcmd" > $g.sed
docommand "${baselabel}.sed" "sed -f $g.sed < $g.old > $g" 0 "" ""
remove $g.old $g.sed
done
docommand "${baselabel}.delta" "${delta} -yNoComment $s" 0 IGNORE IGNORE
}
remove $g
echo "%I% inserted in 1.1" > $g
docommand ei1 "${admin} -n -i$g s.foo" 0 IGNORE IGNORE
remove $g
docommand ei2 "${vg_get} -s -p $s" 0 "1.1 inserted in 1.1\n" IGNORE
do_change ei3 '1 a\
This line inserted in 1.2 and deleted in 1.3'
docommand ei4 "${vg_get} -s -p $s" 0 '1.2 inserted in 1.1
This line inserted in 1.2 and deleted in 1.3
' IGNORE
docommand "bi1" "${vg_get} -e -r1.1 $s" 0 "1.1\nnew delta 1.1.1.1\n1 lines\n" ""
echo "inserted on branch 1.1.1.1" >> $g
docommand "bi1" "${delta} -yNone $s" 0 "1.1.1.1
1 inserted
0 deleted
1 unchanged
" ""
do_change ei5 '2d' 'a\
This line inserted in 1.3 and deleted in 1.4'
docommand ei6 "${vg_get} -s -p $s" 0 '1.3 inserted in 1.1
This line inserted in 1.3 and deleted in 1.4
' IGNORE
do_change ei7 '2d'
docommand ei8 "${vg_get} -s -p $s" 0 '1.4 inserted in 1.1
' IGNORE
docommand ei9 "${vg_get} -g $s" 0 "1.4\n" "IGNORE"
docommand ei10 "${vg_get} -e -i1.1.1.1 -x1.3 $s" 0 IGNORE IGNORE
echo "inserted in 1.5" >> $g
docommand ei11 "${delta} -yNone $s" 0 IGNORE IGNORE
expect_fail=true
docommand ei12 "${vg_get} -s -p $s" 0 '1.5 inserted in 1.1
inserted on branch 1.1.1.1
This line inserted in 1.2 and deleted in 1.3
inserted in 1.5
' IGNORE
docommand ei13 "${vg_get} -e -x1.4 $s" 0 IGNORE IGNORE
echo "inserted in 1.6" >> $g
docommand ei14 "${delta} -yNone $s" 0 IGNORE IGNORE
docommand ei15 "${vg_get} -s -p $s" 0 '1.6 inserted in 1.1
inserted on branch 1.1.1.1
This line inserted in 1.2 and deleted in 1.3
inserted in 1.5
inserted in 1.6
' IGNORE
docommand ei16 "${vg_get} -e -x1.1.1.1 $s" 0 IGNORE IGNORE
docommand ei17 "${delta} -yNone $s" 0 IGNORE IGNORE
docommand ei18 "${vg_get} -s -p $s" 0 '1.7 inserted in 1.1
This line inserted in 1.2 and deleted in 1.3
inserted in 1.5
inserted in 1.6
' IGNORE
docommand ei19 "${vg_get} -e $s" 0 IGNORE IGNORE
docommand ei20 "${delta} -yNone $s" 0 IGNORE IGNORE
docommand ei21 "${vg_get} -s -p $s" 0 '1.8 inserted in 1.1
This line inserted in 1.2 and deleted in 1.3
inserted in 1.5
inserted in 1.6
' IGNORE
docommand ei22 "${vg_get} -i1.1.1.1 -e $s" 0 IGNORE IGNORE
docommand ei23 "${delta} -yNone $s" 0 IGNORE IGNORE
docommand ei24 "${vg_get} -s -p $s" 0 '1.9 inserted in 1.1
inserted on branch 1.1.1.1
This line inserted in 1.2 and deleted in 1.3
inserted in 1.5
inserted in 1.6
' IGNORE
docommand ei25 "${vg_get} -e $s" 0 IGNORE IGNORE
docommand ei26 "${delta} -g1.5 -yNone $s" 0 IGNORE IGNORE
docommand ei27 "${vg_get} -s -p $s" 0 '1.10 inserted in 1.1
inserted on branch 1.1.1.1
inserted in 1.6
This line inserted in 1.3 and deleted in 1.4
' IGNORE
# cat $s
remove $files
success
|