summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-09 18:27:51 +0000
committerJean Delvare <khali@linux-fr.org>2005-09-09 18:27:51 +0000
commit90eddd873587e6dc65161927476ecf9b2c031121 (patch)
treebc40457c5ca0e51afa24112f78a5280cceba6ee6 /test
parentdc5babe944639e0404a7fce2f2e64155d0271e89 (diff)
downloadquilt-90eddd873587e6dc65161927476ecf9b2c031121.tar.gz
- test/*.test: Fix sed compatibility issues: do not use inplace (-i); do
not filter out tabs in patches, it's no more needed now that --no-timestamps is used; do not use the "a" command. Based on a patch by John Vandenberg.
Diffstat (limited to 'test')
-rw-r--r--test/annotate.test9
-rw-r--r--test/example1.test10
-rw-r--r--test/fold.test4
-rw-r--r--test/new.test2
-rw-r--r--test/one.test14
-rw-r--r--test/subdir.test2
-rw-r--r--test/two.test14
7 files changed, 30 insertions, 25 deletions
diff --git a/test/annotate.test b/test/annotate.test
index e0906a1..3ca7514 100644
--- a/test/annotate.test
+++ b/test/annotate.test
@@ -12,7 +12,8 @@
$ quilt add foo
> File foo added to patch patches/patch
- $ sed -ie 's:b:B:' foo
+ $ sed -e 's:b:B:' foo > foo.new
+ $ mv foo.new foo
$ quilt refresh
> Refreshed patch patches/patch
@@ -29,7 +30,8 @@
$ quilt add foo
> File foo added to patch patches/patch2
- $ sed -ie 's:Baz:baz:' foo
+ $ sed -e 's:Baz:baz:' foo > foo.new
+ $ mv foo.new foo
$ quilt refresh
> Refreshed patch patches/patch2
@@ -47,7 +49,8 @@
$ quilt add foo
> File foo added to patch patches/patch3
- $ sed -ie '/Bar/d' foo
+ $ sed -e '/Bar/d' foo > foo.new
+ $ mv foo.new foo
$ quilt refresh
> Refreshed patch patches/patch3
diff --git a/test/example1.test b/test/example1.test
index d50b53e..01eca82 100644
--- a/test/example1.test
+++ b/test/example1.test
@@ -25,7 +25,7 @@ Or ``quilt edit Oberon.txt''
$ quilt refresh
> Refreshed patch %{P}flower.diff
- $ cat patches/flower.diff | sed -e "s/\\t.*//"
+ $ cat patches/flower.diff
> Index: example1/Oberon.txt
> ===================================================================
> --- example1.orig/Oberon.txt
@@ -38,9 +38,11 @@ Or ``quilt edit Oberon.txt''
> +Will make a man or woman madly dote
> +Upon the next live creature that it sees.
- $ sed -e "4aFetch me that flower; the herb I shew'd thee once:" Oberon.txt > Oberon.new
+ $ sed -ne '1,4p' Oberon.txt > Oberon.new
+ $ echo "Fetch me that flower; the herb I shew'd thee once:" >> Oberon.new
+ $ sed -e '1,4d' Oberon.txt >> Oberon.new
$ mv Oberon.new Oberon.txt
- $ quilt diff -z | sed -e "s/\\t.*//"
+ $ quilt diff -z
> Index: example1/Oberon.txt
> ===================================================================
> --- example1.orig/Oberon.txt
@@ -54,7 +56,7 @@ Or ``quilt edit Oberon.txt''
> Will make a man or woman madly dote
> Upon the next live creature that it sees.
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: example1/Oberon.txt
> ===================================================================
> --- example1.orig/Oberon.txt
diff --git a/test/fold.test b/test/fold.test
index 4c16922..bae1cef 100644
--- a/test/fold.test
+++ b/test/fold.test
@@ -33,7 +33,7 @@
< @@ -0,0 +1 @@
< +This is file3.txt.
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/file1.txt
> ===================================================================
> --- /dev/null
@@ -56,7 +56,7 @@
< +This is file3.txt, now modified.
$ cd ..
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/file1.txt
> ===================================================================
> --- /dev/null
diff --git a/test/new.test b/test/new.test
index 1ca7cad..90cf47c 100644
--- a/test/new.test
+++ b/test/new.test
@@ -34,7 +34,7 @@
$ echo new > f
$ quilt refresh
> Refreshed patch %{P}p.diff
- $ cat patches/p.diff | sed -e "s/\\t.*//"
+ $ cat patches/p.diff
> Index: d/f
> ===================================================================
> --- d.orig/f
diff --git a/test/one.test b/test/one.test
index 0bf0b70..6cf809e 100644
--- a/test/one.test
+++ b/test/one.test
@@ -24,7 +24,7 @@ of the installed quilt with `make check'.
> Nothing in patch %{P}patch1.diff
$ echo "This is file two." > file2
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/file2
> ===================================================================
> --- /dev/null
@@ -32,7 +32,7 @@ of the installed quilt with `make check'.
> @@ -0,0 +1 @@
> +This is file two.
- $ quilt diff -z | sed -e "s/\\t.*//"
+ $ quilt diff -z
> Index: d/file2
> ===================================================================
> --- /dev/null
@@ -45,7 +45,7 @@ of the installed quilt with `make check'.
$ quilt diff -z
$ echo "Another line has been added." >> dir/file1
- $ quilt diff -z | sed -e "s/\\t.*//"
+ $ quilt diff -z
> Index: d/dir/file1
> ===================================================================
> --- d.orig/dir/file1
@@ -54,7 +54,7 @@ of the installed quilt with `make check'.
> This is file one.
> +Another line has been added.
- $ quilt diff -z dir/file1 | sed -e "s/\\t.*//"
+ $ quilt diff -z dir/file1
> Index: d/dir/file1
> ===================================================================
> --- d.orig/dir/file1
@@ -105,7 +105,7 @@ of the installed quilt with `make check'.
> File file4 added to patch %{P}subdir/patch3.diff
$ rm file4
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/file4
> ===================================================================
> --- d.orig/file4
@@ -124,8 +124,7 @@ of the installed quilt with `make check'.
> Refreshed patch %{P}patch2.diff
$ echo "Another line added." >> file2
- $ quilt diff -z -P patch1 | sed -e "s/\\t.*//"
- > More recent patches modify files in patch %{P}patch1.diff
+ $ quilt diff -z -P patch1
> Index: d/file2
> ===================================================================
> --- d.orig/file2
@@ -133,6 +132,7 @@ of the installed quilt with `make check'.
> @@ -1 +1,2 @@
> This is file two.
> +Another line added.
+ > More recent patches modify files in patch %{P}patch1.diff
$ quilt refresh patch1
> More recent patches modify files in patch %{P}patch1.diff. Enforce refresh with -f.
diff --git a/test/subdir.test b/test/subdir.test
index 118b775..9e66d53 100644
--- a/test/subdir.test
+++ b/test/subdir.test
@@ -38,7 +38,7 @@
> subdir/file2
> subdir/file3
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/subdir/file
> ===================================================================
> --- d.orig/subdir/file
diff --git a/test/two.test b/test/two.test
index 0659486..445942b 100644
--- a/test/two.test
+++ b/test/two.test
@@ -20,7 +20,7 @@
> Nothing in patch %{_P}patch1.diff
$ echo "This is file two." > file2
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/d/file2
> ===================================================================
> --- /dev/null
@@ -28,7 +28,7 @@
> @@ -0,0 +1 @@
> +This is file two.
- $ quilt diff -z | sed -e "s/\\t.*//"
+ $ quilt diff -z
> Index: d/d/file2
> ===================================================================
> --- /dev/null
@@ -41,7 +41,7 @@
$ quilt diff -z
$ echo "Another line has been added." >> dir/file1
- $ quilt diff -z | sed -e "s/\\t.*//"
+ $ quilt diff -z
> Index: d/d/dir/file1
> ===================================================================
> --- d.orig/d/dir/file1
@@ -51,7 +51,7 @@
> +Another line has been added.
$ cd dir
- $ quilt diff -z file1 | sed -e "s/\\t.*//"
+ $ quilt diff -z file1
> Index: d/d/dir/file1
> ===================================================================
> --- d.orig/d/dir/file1
@@ -108,7 +108,7 @@
> File d/file4 added to patch %{_P}subdir/patch3.diff
$ rm file4
- $ quilt diff | sed -e "s/\\t.*//"
+ $ quilt diff
> Index: d/d/file4
> ===================================================================
> --- d.orig/d/file4
@@ -127,8 +127,7 @@
> Refreshed patch %{_P}patch2.diff
$ echo "Another line added." >> file2
- $ quilt diff -z -P patch1 | sed -e "s/\\t.*//"
- > More recent patches modify files in patch %{_P}patch1.diff
+ $ quilt diff -z -P patch1
> Index: d/d/file2
> ===================================================================
> --- d.orig/d/file2
@@ -136,6 +135,7 @@
> @@ -1 +1,2 @@
> This is file two.
> +Another line added.
+ > More recent patches modify files in patch %{_P}patch1.diff
$ quilt refresh patch1
> More recent patches modify files in patch %{_P}patch1.diff. Enforce refresh with -f.