summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2004-06-10 20:08:37 +0000
committerAndreas Gruenbacher <agruen@suse.de>2004-06-10 20:08:37 +0000
commit71d64f6c066574e47dfc0363efc576dd21474f8e (patch)
treefba3c6f2e10b661c208d0c06d32c4b2ad4ced93b /test
parent27a5cb45dd2f3fa87f295fb3c5de91de96ba3a7b (diff)
downloadquilt-71d64f6c066574e47dfc0363efc576dd21474f8e.tar.gz
- Add meta-data version check/upgrade code from Martin Quinson and
me; new `quilt upgrade' command. - Handle new/removed files correctly in generated patches: If the old or new file is missing, the file name in the patch should be /dev/null. Fix test suite accordingly, and add test/create-delete.diff. GNU patch recognizes this, and does additional file existance tests when a patch creates/deletes a file. Also use the --label option of GNU diff instead of hand-editing file name headers. - Add test/Makefile for running the test suite. Note: The tests run against the installed version of quilt! - Bump version to 0.34.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile10
-rw-r--r--test/fold.test4
-rw-r--r--test/new.test2
-rw-r--r--test/one.test6
-rw-r--r--test/subdir.test4
-rw-r--r--test/two.test6
6 files changed, 21 insertions, 11 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..0595d2e
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,10 @@
+TESTS=$(wildcard *.test)
+
+all: $(patsubst %,_test_%,$(TESTS))
+
+.PHONY: $(patsubst %,_test_%,$(TESTS))
+$(patsubst %,_test_%,$(TESTS)):
+ @test=$(patsubst _test_%,%,$@); \
+ echo "[$$test]" ; \
+ export QUILTRC=test.quiltrc ; \
+ ./run $$test
diff --git a/test/fold.test b/test/fold.test
index 0695909..331138a 100644
--- a/test/fold.test
+++ b/test/fold.test
@@ -38,13 +38,13 @@
$ quilt diff | sed -e "s/\\t.*//"
> Index: d/dir/file3.txt
> ===================================================================
- > --- d.orig/dir/file3.txt
+ > --- /dev/null
> +++ d/dir/file3.txt
> @@ -0,0 +1 @@
> +This is file3.txt.
> Index: d/file1.txt
> ===================================================================
- > --- d.orig/file1.txt
+ > --- /dev/null
> +++ d/file1.txt
> @@ -0,0 +1 @@
> +This is file1.txt.
diff --git a/test/new.test b/test/new.test
index dfa8f64..e46bba1 100644
--- a/test/new.test
+++ b/test/new.test
@@ -44,7 +44,7 @@
> +new
> Index: d/g
> ===================================================================
- > --- d.orig/g
+ > --- /dev/null
> +++ d/g
> @@ -0,0 +1 @@
> +added
diff --git a/test/one.test b/test/one.test
index ce29235..6d92dcb 100644
--- a/test/one.test
+++ b/test/one.test
@@ -27,7 +27,7 @@ of the installed quilt with `make check'.
$ quilt diff | sed -e "s/\\t.*//"
> Index: d/file2
> ===================================================================
- > --- d.orig/file2
+ > --- /dev/null
> +++ d/file2
> @@ -0,0 +1 @@
> +This is file two.
@@ -35,7 +35,7 @@ of the installed quilt with `make check'.
$ quilt diff -z | sed -e "s/\\t.*//"
> Index: d/file2
> ===================================================================
- > --- d.orig/file2
+ > --- /dev/null
> +++ d/file2
> @@ -0,0 +1 @@
> +This is file two.
@@ -109,7 +109,7 @@ of the installed quilt with `make check'.
> Index: d/file4
> ===================================================================
> --- d.orig/file4
- > +++ d/file4
+ > +++ /dev/null
> @@ -1 +0,0 @@
> -This is file 4.
diff --git a/test/subdir.test b/test/subdir.test
index 5e6bbda..e4334d5 100644
--- a/test/subdir.test
+++ b/test/subdir.test
@@ -48,14 +48,14 @@
> +new contents
> Index: d/subdir/file2
> ===================================================================
- > --- d.orig/subdir/file2
+ > --- /dev/null
> +++ d/subdir/file2
> @@ -0,0 +1 @@
> +another file
> Index: d/subdir/file3
> ===================================================================
> --- d.orig/subdir/file3
- > +++ d/subdir/file3
+ > +++ /dev/null
> @@ -1 +0,0 @@
> -yet another file
diff --git a/test/two.test b/test/two.test
index 372dd72..bbacbae 100644
--- a/test/two.test
+++ b/test/two.test
@@ -23,7 +23,7 @@
$ quilt diff | sed -e "s/\\t.*//"
> Index: d/d/file2
> ===================================================================
- > --- d.orig/d/file2
+ > --- /dev/null
> +++ d/d/file2
> @@ -0,0 +1 @@
> +This is file two.
@@ -31,7 +31,7 @@
$ quilt diff -z | sed -e "s/\\t.*//"
> Index: d/d/file2
> ===================================================================
- > --- d.orig/d/file2
+ > --- /dev/null
> +++ d/d/file2
> @@ -0,0 +1 @@
> +This is file two.
@@ -112,7 +112,7 @@
> Index: d/d/file4
> ===================================================================
> --- d.orig/d/file4
- > +++ d/d/file4
+ > +++ /dev/null
> @@ -1 +0,0 @@
> -This is file 4.