chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'kha/safe'
[stgit]
/
t
/
t2000-sync.sh
diff --git
a/t/t2000-sync.sh
b/t/t2000-sync.sh
index f4e8b07763bc04a7600682a4940fe14da28141ab..d5505388870d49959a878ebeea7fa06d026f0219 100755
(executable)
--- a/
t/t2000-sync.sh
+++ b/
t/t2000-sync.sh
@@
-30,8
+30,8
@@
test_expect_success \
stg refresh &&
stg export &&
stg pop &&
stg refresh &&
stg export &&
stg pop &&
- [ "$(echo $(stg
applied
))" = "p1 p2" ] &&
- [ "$(echo $(stg
unapplied
))" = "p3" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p3" ]
'
test_expect_success \
'
test_expect_success \
@@
-41,16
+41,16
@@
test_expect_success \
stg new p1 -m p1 &&
stg new p2 -m p2 &&
stg new p3 -m p3 &&
stg new p1 -m p1 &&
stg new p2 -m p2 &&
stg new p3 -m p3 &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ]
'
test_expect_success \
'Synchronise second patch with the master branch' \
'
stg sync -B master p2 &&
'
test_expect_success \
'Synchronise second patch with the master branch' \
'
stg sync -B master p2 &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
test $(cat foo2.txt) = "foo2"
'
test $(cat foo2.txt) = "foo2"
'
@@
-58,8
+58,8
@@
test_expect_success \
'Synchronise the first two patches with the master branch' \
'
stg sync -B master -a &&
'Synchronise the first two patches with the master branch' \
'
stg sync -B master -a &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
test $(cat foo1.txt) = "foo1" &&
test $(cat foo2.txt) = "foo2"
'
test $(cat foo1.txt) = "foo1" &&
test $(cat foo2.txt) = "foo2"
'
@@
-68,8
+68,8
@@
test_expect_success \
'Synchronise all the patches with the exported series' \
'
stg sync -s patches-master/series -a &&
'Synchronise all the patches with the exported series' \
'
stg sync -s patches-master/series -a &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
test $(cat foo1.txt) = "foo1" &&
test $(cat foo2.txt) = "foo2" &&
test $(cat foo3.txt) = "foo3"
test $(cat foo1.txt) = "foo1" &&
test $(cat foo2.txt) = "foo2" &&
test $(cat foo3.txt) = "foo3"
@@
-79,8
+79,8
@@
test_expect_success \
'Modify the master patches' \
'
stg branch master &&
'Modify the master patches' \
'
stg branch master &&
- [ "$(echo $(stg
applied
))" = "p1 p2" ] &&
- [ "$(echo $(stg
unapplied
))" = "p3" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p3" ] &&
stg goto p1 &&
echo bar1 >> foo1.txt &&
stg refresh &&
stg goto p1 &&
echo bar1 >> foo1.txt &&
stg refresh &&
@@
-91,8
+91,8
@@
test_expect_success \
stg goto p3 &&
echo bar3 >> foo3.txt &&
stg refresh &&
stg goto p3 &&
echo bar3 >> foo3.txt &&
stg refresh &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
stg export &&
stg branch foo
'
stg export &&
stg branch foo
'
@@
-101,8
+101,8
@@
test_expect_success \
'Synchronise second patch with the master branch' \
'
stg sync -B master p2 &&
'Synchronise second patch with the master branch' \
'
stg sync -B master p2 &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
test $(cat bar2.txt) = "bar2"
'
test $(cat bar2.txt) = "bar2"
'
@@
-115,13
+115,13
@@
test_expect_success \
test_expect_success \
'Restore the stack status after the failed sync' \
'
test_expect_success \
'Restore the stack status after the failed sync' \
'
- [ "$(echo $(stg
applied
))" = "p1" ] &&
- [ "$(echo $(stg
unapplied
))" = "p2 p3" ] &&
-
stg resolved -a
&&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p2 p3" ] &&
+
git add --update
&&
stg refresh &&
stg goto p3
stg refresh &&
stg goto p3
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ]
'
test_expect_success \
'
test_expect_success \
@@
-133,12
+133,12
@@
test_expect_success \
test_expect_success \
'Restore the stack status after the failed sync' \
'
test_expect_success \
'Restore the stack status after the failed sync' \
'
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ] &&
-
stg resolved -a
&&
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ] &&
+
git add --update
&&
stg refresh &&
stg refresh &&
- [ "$(echo $(stg
applied
))" = "p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ]
'
test_done
'
test_done