##// END OF EJS Templates
test-mq-subrepo.t: correctly forward stdin to test functions...
Patrick Mezard -
r13241:bb43a9ab default
parent child Browse files
Show More
@@ -4,6 +4,8 b''
4 4 $ echo "[diff]" >> $HGRCPATH
5 5 $ echo "nodates=1" >> $HGRCPATH
6 6
7 $ stdin=`pwd`/stdin.tmp
8
7 9 fn to create new repository w/dirty subrepo, and cd into it
8 10 $ mkrepo() {
9 11 > hg init $1
@@ -21,41 +23,42 b' fn to create dirty subrepo'
21 23 > }
22 24
23 25 $ testadd() {
24 > local stdin=`cat`
26 > cat - > "$stdin"
25 27 > mksubrepo sub
26 28 > echo sub = sub >> .hgsub
27 29 > hg add .hgsub
28 30 > echo % abort when adding .hgsub w/dirty subrepo
29 31 > hg status -S
30 32 > echo '%' $*
31 > echo "$stdin" | hg $*
33 > cat "$stdin" | hg $*
32 34 > echo [$?]
33 35 > hg -R sub ci -m0sub
34 36 > echo % update substate when adding .hgsub w/clean updated subrepo
35 37 > hg status -S
36 38 > echo '%' $*
37 > echo "$stdin" | hg $*
39 > cat "$stdin" | hg $*
38 40 > hg debugsub
39 41 > }
40 42
41 43 $ testmod() {
42 > local stdin=`cat`
44 > cat - > "$stdin"
43 45 > mksubrepo sub2
44 46 > echo sub2 = sub2 >> .hgsub
45 47 > echo % abort when modifying .hgsub w/dirty subrepo
46 48 > hg status -S
47 49 > echo '%' $*
48 > echo "$stdin" | hg $*
50 > cat "$stdin" | hg $*
49 51 > echo [$?]
50 52 > hg -R sub2 ci -m0sub2
51 53 > echo % update substate when modifying .hgsub w/clean updated subrepo
52 54 > hg status -S
53 55 > echo '%' $*
54 > echo "$stdin" | hg $*
56 > cat "$stdin" | hg $*
55 57 > hg debugsub
56 58 > }
57 59
58 60 $ testrm1() {
61 > cat - > "$stdin"
59 62 > mksubrepo sub3
60 63 > echo sub3 = sub3 >> .hgsub
61 64 > hg ci -Aqmsub3
@@ -65,11 +68,13 b' fn to create dirty subrepo'
65 68 > echo % update substate when removing .hgsub w/dirty subrepo
66 69 > hg status -S
67 70 > echo '%' $*
68 > echo "$stdin" | hg $*
71 > cat "$stdin" | hg $*
69 72 > echo % debugsub should be empty
70 73 > hg debugsub
71 74 > }
75
72 76 $ testrm2() {
77 > cat - > "$stdin"
73 78 > mksubrepo sub4
74 79 > echo sub4 = sub4 >> .hgsub
75 80 > hg ci -Aqmsub4
@@ -78,7 +83,7 b' fn to create dirty subrepo'
78 83 > echo % update substate when removing .hgsub w/clean updated subrepo
79 84 > hg status -S
80 85 > echo '%' $*
81 > echo "$stdin" | hg $*
86 > cat "$stdin" | hg $*
82 87 > echo % debugsub should be empty
83 88 > hg debugsub
84 89 > }
General Comments 0
You need to be logged in to leave comments. Login now