Merge branch 'stable'
[stgit] / t / t2000-sync.sh
index 69ab1ac..e489603 100755 (executable)
@@ -18,15 +18,15 @@ test_expect_success \
     '
     stg new p1 -m p1 &&
     echo foo1 > foo1.txt &&
-    stg add foo1.txt &&
+    git add foo1.txt &&
     stg refresh &&
     stg new p2 -m p2 &&
     echo foo2 > foo2.txt &&
-    stg add foo2.txt &&
+    git add foo2.txt &&
     stg refresh &&
     stg new p3 -m p3 &&
     echo foo3 > foo3.txt &&
-    stg add foo3.txt &&
+    git add foo3.txt &&
     stg refresh &&
     stg export &&
     stg pop &&
@@ -48,7 +48,7 @@ test_expect_success \
 test_expect_success \
     'Synchronise second patch with the master branch' \
     '
-    stg sync -b master p2 &&
+    stg sync -B master p2 &&
     [ "$(echo $(stg applied))" = "p1 p2 p3" ] &&
     [ "$(echo $(stg unapplied))" = "" ] &&
     test $(cat foo2.txt) = "foo2"
@@ -57,7 +57,7 @@ test_expect_success \
 test_expect_success \
     'Synchronise the first two patches with the master branch' \
     '
-    stg sync -b master -a &&
+    stg sync -B master -a &&
     [ "$(echo $(stg applied))" = "p1 p2 p3" ] &&
     [ "$(echo $(stg unapplied))" = "" ] &&
     test $(cat foo1.txt) = "foo1" &&
@@ -86,7 +86,7 @@ test_expect_success \
     stg refresh &&
     stg goto p2 &&
     echo bar2 > bar2.txt &&
-    stg add bar2.txt &&
+    git add bar2.txt &&
     stg refresh &&
     stg goto p3 &&
     echo bar3 >> foo3.txt &&
@@ -100,16 +100,16 @@ test_expect_success \
 test_expect_success \
     'Synchronise second patch with the master branch' \
     '
-    stg sync -b master p2 &&
+    stg sync -B master p2 &&
     [ "$(echo $(stg applied))" = "p1 p2 p3" ] &&
     [ "$(echo $(stg unapplied))" = "" ] &&
     test $(cat bar2.txt) = "bar2"
     '
 
-test_expect_failure \
+test_expect_success \
     'Synchronise the first two patches with the master branch (to fail)' \
     '
-    stg sync -b master -a
+    ! stg sync -B master -a
     '
 
 test_expect_success \
@@ -124,10 +124,10 @@ test_expect_success \
     [ "$(echo $(stg unapplied))" = "" ]
     '
 
-test_expect_failure \
+test_expect_success \
     'Synchronise the third patch with the exported series (to fail)' \
     '
-    stg sync -s patches-master/series p3
+    stg sync -s patches-master/series p3
     '
 
 test_expect_success \