From: Karl Hasselström Date: Sun, 29 Jun 2008 22:33:07 +0000 (+0200) Subject: Try "stg sink" without applied patches X-Git-Tag: v0.15-rc1~49^2~14 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/205b1af9e9649152dfc10d9456396dc74bec6daf Try "stg sink" without applied patches It doesn't work, neither with an implicit nor an explicit patch to sink. This is bug 11887 in the bug tracker. (The implicit sink testcase actually passes, but that's just because the test suite can't distinguish between a program bug and an orderly abort.) The test was adapted from the script attached to the bug report, written by Erik Sandberg. Signed-off-by: Karl Hasselström --- diff --git a/t/t1501-sink.sh b/t/t1501-sink.sh new file mode 100755 index 0000000..3872c4b --- /dev/null +++ b/t/t1501-sink.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +test_description='Test "stg sink"' + +. ./test-lib.sh + +test_expect_success 'Initialize StGit stack' ' + echo 000 >> x && + git add x && + git commit -m initial && + echo 000 >> y && + git add y && + git commit -m y && + stg init && + stg uncommit && + stg pop +' + +test_expect_success 'sink without applied patches' ' + ! stg sink +' + +test_expect_failure 'sink a specific patch without applied patches' ' + stg sink y && + test $(echo $(stg applied)) = "y" +' + +test_done