From ab96cd1c21c3bb7aa4efd802da97ef6b3e426ed5 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 19 Dec 2007 21:51:21 +0100 Subject: [PATCH] Test that "stg goto" can be called from a subdirectory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Karl Hasselström It currently can't; therefore, the tests are marked as known failures. Signed-off-by: Karl Hasselström --- t/t2800-goto-subdir.sh | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 t/t2800-goto-subdir.sh diff --git a/t/t2800-goto-subdir.sh b/t/t2800-goto-subdir.sh new file mode 100755 index 0000000..9f3ab26 --- /dev/null +++ b/t/t2800-goto-subdir.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +test_description='Run "stg goto" in a subdirectory' + +. ./test-lib.sh + +test_expect_success 'Initialize StGit stack' ' + stg init && + echo expected1.txt >> .git/info/exclude && + echo expected2.txt >> .git/info/exclude && + echo actual.txt >> .git/info/exclude && + mkdir foo && + for i in 1 2 3; do + echo foo$i >> foo/bar && + stg new p$i -m p$i && + git add foo/bar && + stg refresh + done +' + +cat > expected1.txt < expected2.txt < actual.txt && + diff -u expected1.txt actual.txt && + ls foo > actual.txt && + diff -u expected2.txt actual.txt +' + +test_expect_success 'Prepare conflicting goto' ' + stg delete p2 +' + +cat > expected1.txt <>>>>>> patched:foo/bar +EOF +cat > expected2.txt < actual.txt && + diff -u expected1.txt actual.txt && + ls foo > actual.txt && + diff -u expected2.txt actual.txt +' + +test_done -- [mdw]