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

[PATCH 1/2] t3000: use test_cmp instead of diff

From
Jeff King <peff@peff.net>
Date
Mar 8, 2009, 01:22 UTC
Message-ID
<20090308012206.GA18714@coredump.intra.peff.net>
In-Reply-To
<20090308012049.GA18616@coredump.intra.peff.net>
These ancient tests predate test_cmp.

While we're at it, let's switch to our usual "expected before actual" order of arguments; this makes the diff output "here's what is changed from expected" instead of the reverse.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t3000-ls-files-others.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index bc0a351..36eee0f 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -42,7 +42,7 @@ test_expect_success \
 
 test_expect_success \
     'git ls-files --others should pick up symlinks.' \
-    'diff output expected1'
+    'test_cmp expected1 output'
 
 test_expect_success \
     'git ls-files --others --directory to show output.' \
@@ -51,6 +51,6 @@ test_expect_success \
 
 test_expect_success \
     'git ls-files --others --directory should not get confused.' \
-    'diff output expected2'
+    'test_cmp expected2 output'
 
 test_done
-- 
1.6.2.198.ge2a58
Previous: Jeff KingNext: Jeff King
Message 2 of 6 in “fix ls-files parseopt regression”
  1. 0/2 fix ls-files parseopt regressionJeff King, Mar 8, 2009
  2. 1/2 t3000: use test_cmp instead of diffJeff King, Mar 8, 2009
  3. 2/2 ls-files: fix broken --no-empty-directoryJeff King, Mar 8, 2009
  4. Miklos VajnaMar 8, 2009
  5. Jeff KingMar 10, 2009
  6. Miklos VajnaMar 10, 2009

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.