chiark / gitweb /
Check for disappeared newborn files in git.tree_status (bug #8516)
[stgit] / t / t0002-status.sh
index 6389a23f0464a52a13213e4b0d1a607bcfbfc6bc..43e1ca08e4deba373408c9914cd04f85c545b3eb 100755 (executable)
@@ -159,4 +159,16 @@ test_expect_success 'Status after deleting a file' '
     diff -u expected.txt output.txt
 '
 
+cat > expected.txt <<EOF
+D foo/bar
+EOF
+test_expect_success 'Status of disappeared newborn' '
+    stg refresh &&
+    touch foo/bar &&
+    stg add foo/bar &&
+    rm foo/bar &&
+    stg status > output.txt &&
+    diff -u expected.txt output.txt
+'
+
 test_done