diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-07-06 15:37:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-06 15:37:42 -0700 |
commit | 4d9e42f8f11c57b32b976a943c8ddaf6214e64b8 (patch) | |
tree | f1aee1490288aa30fb62a981696389d9b5e3e992 /t/t4103-apply-binary.sh | |
parent | checkout: do not write bogus reflog entry out (diff) | |
parent | GIT 1.6.0 (diff) | |
download | tgif-4d9e42f8f11c57b32b976a943c8ddaf6214e64b8.tar.xz |
Merge commit 'v1.6.0' into jc/checkout-reflog-fix
* commit 'v1.6.0': (2063 commits)
GIT 1.6.0
git-p4: chdir now properly sets PWD environment variable in msysGit
Improve error output of git-rebase
t9300: replace '!' with test_must_fail
Git.pm: Make File::Spec and File::Temp requirement lazy
Documentation: document the pager.* configuration setting
git-stash: improve synopsis in help and manual page
Makefile: building git in cygwin 1.7.0
git-am: ignore --binary option
bash-completion: Add non-command git help files to bash-completion
Fix t3700 on filesystems which do not support question marks in names
Utilise our new p4_read_pipe and p4_write_pipe wrappers
Add p4 read_pipe and write_pipe wrappers
bash completion: Add '--merge' long option for 'git log'
bash completion: Add completion for 'git mergetool'
git format-patch documentation: clarify what --cover-letter does
bash completion: 'git apply' should use 'fix' not 'strip'
t5304-prune: adjust file mtime based on system time rather than file mtime
test-parse-options: use appropriate cast in length_callback
Fix escaping of glob special characters in pathspecs
...
Conflicts:
builtin-checkout.c
Diffstat (limited to 't/t4103-apply-binary.sh')
-rwxr-xr-x | t/t4103-apply-binary.sh | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh index 74f06ec730..7da0b4bb8b 100755 --- a/t/t4103-apply-binary.sh +++ b/t/t4103-apply-binary.sh @@ -24,10 +24,10 @@ git update-index --add --remove file1 file2 file4 git-commit -m 'Initial Version' 2>/dev/null git-checkout -b binary -tr 'x' '\000' <file1 >file3 +perl -pe 'y/x/\000/' <file1 >file3 cat file3 >file4 git add file2 -tr '\000' 'v' <file3 >file1 +perl -pe 'y/\000/v/' <file3 >file1 rm -f file2 git update-index --add --remove file1 file2 file3 file4 git-commit -m 'Second Version' @@ -46,21 +46,25 @@ test_expect_success 'stat binary diff (copy) -- should not fail.' \ 'git-checkout master git apply --stat --summary C.diff' -test_expect_failure 'check binary diff -- should fail.' \ - 'git-checkout master - git apply --check B.diff' +test_expect_success 'check binary diff -- should fail.' \ + 'git-checkout master && + test_must_fail git apply --check B.diff' -test_expect_failure 'check binary diff (copy) -- should fail.' \ - 'git-checkout master - git apply --check C.diff' +test_expect_success 'check binary diff (copy) -- should fail.' \ + 'git-checkout master && + test_must_fail git apply --check C.diff' -test_expect_failure 'check incomplete binary diff with replacement -- should fail.' \ - 'git-checkout master - git apply --check --allow-binary-replacement B.diff' +test_expect_success \ + 'check incomplete binary diff with replacement -- should fail.' ' + git-checkout master && + test_must_fail git apply --check --allow-binary-replacement B.diff +' -test_expect_failure 'check incomplete binary diff with replacement (copy) -- should fail.' \ - 'git-checkout master - git apply --check --allow-binary-replacement C.diff' +test_expect_success \ + 'check incomplete binary diff with replacement (copy) -- should fail.' ' + git-checkout master && + test_must_fail git apply --check --allow-binary-replacement C.diff +' test_expect_success 'check binary diff with replacement.' \ 'git-checkout master @@ -73,42 +77,42 @@ test_expect_success 'check binary diff with replacement (copy).' \ # Now we start applying them. do_reset () { - rm -f file? - git-reset --hard + rm -f file? && + git-reset --hard && git-checkout -f master } -test_expect_failure 'apply binary diff -- should fail.' \ - 'do_reset - git apply B.diff' +test_expect_success 'apply binary diff -- should fail.' \ + 'do_reset && + test_must_fail git apply B.diff' -test_expect_failure 'apply binary diff -- should fail.' \ - 'do_reset - git apply --index B.diff' +test_expect_success 'apply binary diff -- should fail.' \ + 'do_reset && + test_must_fail git apply --index B.diff' -test_expect_failure 'apply binary diff (copy) -- should fail.' \ - 'do_reset - git apply C.diff' +test_expect_success 'apply binary diff (copy) -- should fail.' \ + 'do_reset && + test_must_fail git apply C.diff' -test_expect_failure 'apply binary diff (copy) -- should fail.' \ - 'do_reset - git apply --index C.diff' +test_expect_success 'apply binary diff (copy) -- should fail.' \ + 'do_reset && + test_must_fail git apply --index C.diff' test_expect_success 'apply binary diff without replacement.' \ - 'do_reset + 'do_reset && git apply BF.diff' test_expect_success 'apply binary diff without replacement (copy).' \ - 'do_reset + 'do_reset && git apply CF.diff' test_expect_success 'apply binary diff.' \ - 'do_reset + 'do_reset && git apply --allow-binary-replacement --index BF.diff && test -z "$(git diff --name-status binary)"' test_expect_success 'apply binary diff (copy).' \ - 'do_reset + 'do_reset && git apply --allow-binary-replacement --index CF.diff && test -z "$(git diff --name-status binary)"' |