git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Fitzsimons <robfitz@273k.net>
To: git@vger.kernel.org
Cc: Robert Fitzsimons <robfitz@273k.net>
Subject: [PATCH 9/9] New git-apply test cases for scanning forwards and backwards.
Date: Sun, 28 Aug 2005 15:25:10 +0000	[thread overview]
Message-ID: <1125242710834-git-send-email-robfitz@273k.net> (raw)
In-Reply-To: <11252427062184-git-send-email-robfitz@273k.net>

Added a new test case for the scanning forwards and backwards for the
correct location to apply a patch fragment.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>

---

 t/t4110-apply-scan.sh |  101 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)
 create mode 100644 t/t4110-apply-scan.sh

51e9797ee16edc9d6164f2c7afaf1f8245538255
diff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh
new file mode 100644
--- /dev/null
+++ b/t/t4110-apply-scan.sh
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2005 Robert Fitzsimons
+#
+
+test_description='git-apply test for patches which require scanning forwards and backwards.
+
+'
+. ./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_done
+

  reply	other threads:[~2005-08-28 15:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-28 15:24 [PATCH 1/9] Fix git patch header processing in git-apply Robert Fitzsimons
2005-08-28 15:24 ` [PATCH 2/9] Fix detection of files with only one line " Robert Fitzsimons
2005-08-28 15:24   ` [PATCH 3/9] Fix processing of a patch file which modifies the same file " Robert Fitzsimons
2005-08-28 15:24     ` [PATCH 4/9] Fix the procssing of multiple patch files with --check " Robert Fitzsimons
2005-08-28 15:24       ` [PATCH 5/9] New option --force-delete for git-apply Robert Fitzsimons
2005-08-28 15:24         ` [PATCH 6/9] New option --ignore-whitespace " Robert Fitzsimons
2005-08-28 15:24           ` [PATCH 7/9] New option --ignore-applied " Robert Fitzsimons
2005-08-28 15:25             ` [PATCH 8/9] New git-apply test cases for patches with mulitple fragments Robert Fitzsimons
2005-08-28 15:25               ` Robert Fitzsimons [this message]
2005-08-28 16:58           ` [PATCH 6/9] New option --ignore-whitespace for git-apply Linus Torvalds
2005-08-28 20:49             ` A Large Angry SCM
2005-08-28 21:06           ` Junio C Hamano
2005-08-28 21:06         ` [PATCH 5/9] New option --force-delete " Junio C Hamano
2005-08-28 21:06     ` [PATCH 3/9] Fix processing of a patch file which modifies the same file in git-apply Junio C Hamano
2005-08-28 16:55   ` [PATCH 2/9] Fix detection of files with only one line " Linus Torvalds
2005-08-28 23:39 ` [PATCH 1/9] Fix git patch header processing " Junio C Hamano
2005-08-29 23:58   ` Robert Fitzsimons
2005-08-30  0:47     ` Linus Torvalds
2005-08-30  1:09       ` Junio C Hamano
2005-08-30  1:24         ` Linus Torvalds
2005-08-30  1:34           ` Junio C Hamano
2005-08-30  2:00             ` Linus Torvalds
2005-08-30  7:36               ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1125242710834-git-send-email-robfitz@273k.net \
    --to=robfitz@273k.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).