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

[PATCH] t1010-mktree: Adjust expected result to code and documentation

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 15, 2010, 09:34 UTC
Message-ID
<09645aa273ba1215c6c34a5727ef97261ac0a149.1271323912.git.git@drmicha.warpmail.net>

The last two tests here were always supposed to fail in the sense that, according to code and documentation, mktree should read non-recursive ls-tree output, but not recursive one, and therefore explicitely refuses to deal with slashes.

Adjust the test (must_fail) so that it succeeds when mktree dies on slashes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
CC'ed to you, Junio, as the original test author, according
to the new guidelines :)
 t/t1010-mktree.sh |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh
index 9956e3a..b946f87 100755
--- a/t/t1010-mktree.sh
+++ b/t/t1010-mktree.sh
@@ -58,14 +58,12 @@ test_expect_success 'allow missing object with --missing' '
 	test_cmp tree.missing actual
 '
 
-test_expect_failure 'mktree reads ls-tree -r output (1)' '
-	git mktree <all >actual &&
-	test_cmp tree actual
+test_expect_success 'mktree refuses to read ls-tree -r output (1)' '
+	test_must_fail git mktree <all >actual
 '
 
-test_expect_failure 'mktree reads ls-tree -r output (2)' '
-	git mktree <all.withsub >actual &&
-	test_cmp tree.withsub actual
+test_expect_success 'mktree refuses to read ls-tree -r output (2)' '
+	test_must_fail git mktree <all.withsub >actual
 '
 
 test_done
-- 
1.7.1.rc1.248.gcefbb
Message 1 of 1 in “t1010-mktree: Adjust expected result to code and documentation”
  1. t1010-mktree: Adjust expected result to code and documentationMichael J Gruber, Apr 15, 2010

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.