chiark / gitweb /
Improve the t1205 test for push
[stgit] / t / t1205-push-subdir.sh
index f9a84f6182808ad487d46e7eb1a808bcd7e35033..54a5b896e199d8529e99fe994d30d5ee266e63f0 100755 (executable)
@@ -52,4 +52,18 @@ test_expect_success 'Conflicting push from subdir' '
     [ "$(echo $(stg status --conflict))" = "foo/y.txt x.txt" ]
 '
 
+test_expect_success 'Conflicting add/unknown file in subdir' '
+    stg status --reset &&
+    stg new foo -m foo &&
+    mkdir d &&
+    echo foo > d/test &&
+    stg add d/test &&
+    stg refresh &&
+    stg pop &&
+    mkdir -p d &&
+    echo bar > d/test &&
+    ! stg push foo &&
+    [ $(stg top) != "foo" ]
+'
+
 test_done