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

[PATCH] Test case portability fix.

From
Junio C Hamano <junkio@cox.net>
Date
May 26, 2005, 02:11 UTC
Message-ID
<7vr7fug2i4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v1x7uj4i3.fsf_-_@assigned-by-dhcp.cox.net>

This is the remainder of testcase fix by Mark Allen to make them work on his Darwin box. I was using "xargs -r" (GNU) where it was not needed, sed -ne '/^\(author\|committer\)/s|>.*|>|p' where some sed does not know what to do with '\|', and also "cmp - file" to compare standard input with a file, which his cmp does not support.

Author: Mark Allen <mrallen1@yahoo.com>
Author-Date: 
Signed-off-by: Junio C Hamano <junkio@cox.net>
---

t/t0000-basic.sh | 2 +- t/t0110-environment-names-old.sh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -84,7 +84,7 @@ do
 done
 test_expect_success \
     'adding various types of objects with git-update-cache --add.' \
-    'find path* ! -type d -print0 | xargs -0 -r git-update-cache --add'
+    'find path* ! -type d -print0 | xargs -0 git-update-cache --add'
 
 # Show them and see that matches what we expect.
 test_expect_success \
diff --git a/t/t0110-environment-names-old.sh b/t/t0110-environment-names-old.sh
--- a/t/t0110-environment-names-old.sh
+++ b/t/t0110-environment-names-old.sh
@@ -86,8 +86,7 @@ committer A U Thor <author@example.xz>
 EOF
 test_expect_success \
     'verify old AUTHOR variables were used correctly in commit' \
-    'sed -ne '\''/^\(author\|committer\)/s|>.*|>|p'\'' current |
-     cmp - expected'
+    'sed -ne '\''/^\(author\)/s|>.*|>|p'\'' -e'\''/^\(committer\)/s|>.*|>|p'\''\    current > out && cmp out expected'
 
 unset GIT_DIR
 test_expect_success \
@@ -128,7 +127,6 @@ committer R O Htua <rohtua@example.xz>
 EOF
 test_expect_success \
     'verify new AUTHOR variables were used correctly in commit.' \
-    'sed -ne '\''/^\(author\|committer\)/s|>.*|>|p'\'' current |
-     cmp - expected'
+    'sed -ne '\''/^\(author\)/s|>.*|>|p'\'' -e'\''/^\(committer\)/s|>.*|>|p'\''\    current > out && cmp out expected'
 
 test_done
------------------------------------------------
Previous: Junio C HamanoNext: Linus Torvalds
Message 11 of 20 in “change of git-diff-tree and symlinks”
  1. Kay SieversMay 25, 2005
  2. Linus TorvaldsMay 25, 2005
  3. Kay SieversMay 25, 2005
  4. Junio C HamanoMay 25, 2005
  5. Adjust show-files test for dotfiles.Junio C Hamano, May 25, 2005
  6. Fix type-change handling when assigning the status code to filepairs.Junio C Hamano, May 25, 2005
  7. Kay SieversMay 25, 2005
  8. Junio C HamanoMay 25, 2005
  9. Linus TorvaldsMay 25, 2005
  10. Mode only changes from diff.Junio C Hamano, May 25, 2005
  11. Test case portability fix.Junio C Hamano, May 26, 2005
  12. Linus TorvaldsMay 26, 2005
  13. Junio C HamanoMay 26, 2005
  14. Jochen RoemlingMay 29, 2005
  15. Kay SieversMay 29, 2005
  16. Jochen RoemlingMay 29, 2005
  17. Sebastian KuzminskyMay 29, 2005
  18. Sebastian KuzminskyMay 30, 2005
  19. Junio C HamanoMay 29, 2005
  20. Petr BaudisMay 29, 2005

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.