Browse Source

[PATCH] Test case portability fix.

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.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
maint
Mark Allen 20 years ago committed by Linus Torvalds
parent
commit
368da62598
  1. 2
      t/t0000-basic.sh
  2. 6
      t/t0110-environment-names-old.sh

2
t/t0000-basic.sh

@ -84,7 +84,7 @@ do @@ -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 \

6
t/t0110-environment-names-old.sh

@ -86,8 +86,7 @@ committer A U Thor <author@example.xz> @@ -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> @@ -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

Loading…
Cancel
Save