diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:05:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:05:31 -0800 |
commit | 77f143bf3e218857ec8e5244d7e862e8e0c1a041 (patch) | |
tree | 9f720e61941241b53a4f258d0dc62e5a9a360aa8 /t/t4110-apply-scan.sh | |
parent | mktree: fix a memory leak in write_tree() (diff) | |
parent | build-in git-mktree (diff) | |
download | tgif-77f143bf3e218857ec8e5244d7e862e8e0c1a041.tar.xz |
Merge 'build-in git-mktree'
* commit '633e3556ccbc': (5835 commits)
build-in git-mktree
allow -t abbreviation for --track in git branch
gitweb: Remove function prototypes (cleanup)
Documentation: cloning to empty directory is allowed
Clarify kind of conflict in merge-one-file helper
git config: clarify --add and --get-color
archive-tar.c: squelch a type mismatch warning
Start 1.6.4 development
Start 1.6.3.1 maintenance series.
GIT 1.6.3
t4029: use sh instead of bash
t4200: convert sed expression which operates on non-text file to perl
t4200: remove two unnecessary lines
t/annotate-tests.sh: avoid passing a non-newline terminated file to sed
t4118: avoid sed invocation on file without terminating newline
t4118: add missing '&&'
t8005: use egrep when extended regular expressions are required
git-clean doc: the command only affects paths under $(cwd)
improve error message in config.c
t4018-diff-funcname: add cpp xfuncname pattern to syntax test
...
Diffstat (limited to 't/t4110-apply-scan.sh')
-rwxr-xr-x | t/t4110-apply-scan.sh | 96 |
1 files changed, 9 insertions, 87 deletions
diff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh index db60652a37..09f58112e0 100755 --- a/t/t4110-apply-scan.sh +++ b/t/t4110-apply-scan.sh @@ -9,92 +9,14 @@ test_description='git apply test for patches which require scanning forwards and ' . ./test-lib.sh -# setup - -cat > patch1.patch <<\EOF -diff --git a/new.txt b/new.txt -new file mode 100644 ---- /dev/null -+++ b/new.txt -@@ -0,0 +1,12 @@ -+a1 -+a11 -+a111 -+a1111 -+b1 -+b11 -+b111 -+b1111 -+c1 -+c11 -+c111 -+c1111 -EOF -cat > patch2.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -1,7 +1,3 @@ --a1 --a11 --a111 --a1111 - b1 - b11 - b111 -EOF -cat > patch3.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -6,6 +6,10 @@ - b11 - b111 - b1111 -+b2 -+b22 -+b222 -+b2222 - c1 - c11 - c111 -EOF -cat > patch4.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -1,3 +1,7 @@ -+a1 -+a11 -+a111 -+a1111 - b1 - b11 - b111 -EOF -cat > patch5.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -10,3 +10,7 @@ - c11 - c111 - c1111 -+c2 -+c22 -+c222 -+c2222 -EOF - -test_expect_success "S = git apply scan" \ - 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch' -mv new.txt apply.txt - -test_expect_success "S = patch scan" \ - 'cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch' -mv new.txt patch.txt - -test_expect_success "S = cmp" \ - 'cmp apply.txt patch.txt' +test_expect_success 'git apply scan' ' + git apply \ + "$TEST_DIRECTORY/t4110/patch1.patch" \ + "$TEST_DIRECTORY/t4110/patch2.patch" \ + "$TEST_DIRECTORY/t4110/patch3.patch" \ + "$TEST_DIRECTORY/t4110/patch4.patch" \ + "$TEST_DIRECTORY/t4110/patch5.patch" && + test_cmp new.txt "$TEST_DIRECTORY/t4110/expect" +' test_done |