git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] t/t4131-apply-fake-ancestor.sh: fix broken test

From
Brandon Casey <drafnel@gmail.com>
Date
Dec 3, 2011, 20:35 UTC
Message-ID
<1322944550-27344-1-git-send-email-drafnel@gmail.com>

The third test "apply --build-fake-ancestor in a subdirectory" has been broken since it was introduced. It intended to modify a tracked file named 'sub/3.t' and then produce a diff which could be git apply'ed, but the file named 'sub/3.t' does not exist. The file that exists in the repo is called 'sub/3'. Since no tracked files were modified, an empty diff was produced, and the test succeeded.

Correct this test by supplying the intended name of the tracked file, 'sub/3.t', to test_commit in the first test.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 t/t4131-apply-fake-ancestor.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t4131-apply-fake-ancestor.sh b/t/t4131-apply-fake-ancestor.sh
index 94373ca..b1361ce 100755
--- a/t/t4131-apply-fake-ancestor.sh
+++ b/t/t4131-apply-fake-ancestor.sh
@@ -11,7 +11,7 @@ test_expect_success 'setup' '
 	test_commit 1 &&
 	test_commit 2 &&
 	mkdir sub &&
-	test_commit 3 sub/3 &&
+	test_commit 3 sub/3.t &&
 	test_commit 4
 '
 
-- 
1.7.8
Next: Brandon Casey
Message 1 of 6 in “t/t4131-apply-fake-ancestor.sh: fix broken test”
  1. 1/2 t/t4131-apply-fake-ancestor.sh: fix broken testBrandon Casey, Dec 3, 2011
  2. 2/2 builtin/apply.c: report error on failure to recognize inputBrandon Casey, Dec 3, 2011
  3. Artem BityutskiyDec 4, 2011
  4. Brandon CaseyDec 4, 2011
  5. Junio C HamanoDec 5, 2011
  6. Brandon CaseyDec 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.