summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2004-07-04 02:42:40 +0000
committerAndreas Gruenbacher <agruen@suse.de>2004-07-04 02:42:40 +0000
commit4d61bdf5dcfb6fabc1bb0a3ef72dd5c13c370db6 (patch)
treed9d0a3fc845e8d1855ba0206780ddcde10f40d3e /test
parent00227c3952cd1618d0bd6a6a2231046b3153c14e (diff)
downloadquilt-4d61bdf5dcfb6fabc1bb0a3ef72dd5c13c370db6.tar.gz
- Add common GNU Diff format options to diff and refresH commands:
-u, -U num, -c, -C num. REname old -c option (combine patches) of diff command to --combine. - Extend the function that splits comments froM patches and syntax coloring to handLe combined diff format. - Honor the LAnG environment variable again; this goT broken at some point. - Set TEXTDOMAINDIR to where the translations are put so that Messages are found even when not installing into /usr.
Diffstat (limited to 'test')
-rw-r--r--test/formats.test96
-rw-r--r--test/merge.test6
2 files changed, 99 insertions, 3 deletions
diff --git a/test/formats.test b/test/formats.test
new file mode 100644
index 0000000..a91f277
--- /dev/null
+++ b/test/formats.test
@@ -0,0 +1,96 @@
+ $ mkdir d
+ $ cd d
+
+ $ cat > test.txt
+ < 1
+ < 2
+ < old
+ < 4
+ < 5
+
+ $ quilt new test
+ > Patch test is now on top
+
+ $ quilt add test.txt
+ > File test.txt added to patch test
+
+ $ cat > test.txt
+ < 1
+ < 2
+ < new
+ < 4
+ < 5
+
+ $ quilt diff
+ > Index: d/test.txt
+ > ===================================================================
+ > --- d.orig/test.txt
+ > +++ d/test.txt
+ > @@ -1,5 +1,5 @@
+ > 1
+ > 2
+ > -old
+ > +new
+ > 4
+ > 5
+
+ $ quilt diff -R
+ > Index: d/test.txt
+ > ===================================================================
+ > --- d.orig/test.txt
+ > +++ d/test.txt
+ > @@ -1,5 +1,5 @@
+ > 1
+ > 2
+ > -new
+ > +old
+ > 4
+ > 5
+
+ $ quilt diff -U1
+ > Index: d/test.txt
+ > ===================================================================
+ > --- d.orig/test.txt
+ > +++ d/test.txt
+ > @@ -2,3 +2,3 @@
+ > 2
+ > -old
+ > +new
+ > 4
+
+ $ quilt diff -c
+ > Index: d/test.txt
+ > ===================================================================
+ > *** d.orig/test.txt
+ > --- d/test.txt
+ > ***************
+ > *** 1,5 ****
+ > 1
+ > 2
+ > ! old
+ > 4
+ > 5
+ > --- 1,5 ----
+ > 1
+ > 2
+ > ! new
+ > 4
+ > 5
+
+ $ quilt diff -C1
+ > Index: d/test.txt
+ > ===================================================================
+ > *** d.orig/test.txt
+ > --- d/test.txt
+ > ***************
+ > *** 2,4 ****
+ > 2
+ > ! old
+ > 4
+ > --- 2,4 ----
+ > 2
+ > ! new
+ > 4
+
+ $ cd ..
+ $ rm -rf d
diff --git a/test/merge.test b/test/merge.test
index 27dcd34..21799cd 100644
--- a/test/merge.test
+++ b/test/merge.test
@@ -51,7 +51,7 @@ Test the patch merging functionality of `quilt diff'.
> c
> More recent patches modify files in b.diff.
- $ quilt diff -c a.diff -P b.diff | grep -v "^\\(---\\|+++\\)"
+ $ quilt diff --combine a.diff -P b.diff | grep -v "^\\(---\\|+++\\)"
> Index: d/abc.txt
> ===================================================================
> @@ -1,3 +1,3 @@
@@ -62,7 +62,7 @@ Test the patch merging functionality of `quilt diff'.
> c
> More recent patches modify files in b.diff.
- $ quilt diff -c b.diff | grep -v "^\\(---\\|+++\\)"
+ $ quilt diff --combine b.diff | grep -v "^\\(---\\|+++\\)"
> Index: d/abc.txt
> ===================================================================
> @@ -1,3 +1,3 @@
@@ -72,7 +72,7 @@ Test the patch merging functionality of `quilt diff'.
> +b+
> +c+
- $ quilt diff -c - | grep -v "^\\(---\\|+++\\)"
+ $ quilt diff --combine - | grep -v "^\\(---\\|+++\\)"
> Index: d/abc.txt
> ===================================================================
> @@ -1,3 +1,3 @@