diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2003-02-06 22:55:51 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2003-02-06 22:55:51 +0000 |
commit | 42ff877c68eed2b87c485c12911d4cd1860060a0 (patch) | |
tree | 68ad33223e2fc3fc35f68943a14b0df8cb93f52e /test/one.test | |
parent | 8739029dc23797fa51e4f6d4bd0a2a2c553d3b0d (diff) | |
download | quilt-42ff877c68eed2b87c485c12911d4cd1860060a0.tar.gz |
Start with a very minimal test suite
Diffstat (limited to 'test/one.test')
-rw-r--r-- | test/one.test | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/test/one.test b/test/one.test new file mode 100644 index 0000000..5f7d2b4 --- /dev/null +++ b/test/one.test @@ -0,0 +1,112 @@ +# This is a minimal test script that runs a few quilt commands +# and verifies their output. Much needs to be done; particularly +# it sould be possible to run the tests using the built instead +# of the installed quilt with `make check'. +# +# (To run, type `./run one.test' in this directory.) +# +$ mkdir dir +$ echo "This is file one." > dir/file1 +$ quilt new patch1.diff +Patch patch1 is now on top +$ quilt add dir/file1 +File dir/file1 added to patch patch1 +$ quilt add file2 +File file2 added to patch patch1 +$ quilt diff +$ quilt diff -z +$ quilt refresh +Nothing in patch patch1 +$ quilt files +dir/file1 +file2 +$ echo "This is file two." > file2 +$ quilt diff | sed -e "s/\\t.*//" +Index: test/file2 +--- test~patch1/file2 ++++ test/file2 +@@ -0,0 +1 @@ ++This is file two. +$ quilt diff -z | sed -e "s/\\t.*//" +Index: test/file2 +--- test.orig/file2 ++++ test/file2 +@@ -0,0 +1 @@ ++This is file two. +$ quilt refresh +Refreshed patch patch1 +$ quilt diff -z +$ echo "Another line has been added." >> dir/file1 +$ quilt diff -z | sed -e "s/\\t.*//" +Index: test/dir/file1 +--- test.orig/dir/file1 ++++ test/dir/file1 +@@ -1 +1,2 @@ + This is file one. ++Another line has been added. +$ quilt refresh +Refreshed patch patch1 +$ quilt new patch2.diff +Patch patch2 is now on top +$ quilt add dir/file3 +File dir/file3 added to patch patch2 +$ echo "This is file three." > dir/file3 +$ quilt refresh +Refreshed patch patch2 +$ quilt add -p patch1 dir/file3 +File dir/file3 modified by patch patch2 +$ quilt pop +Removing dir/file3 +Removed patch2, now at patch1 + +$ quilt add file4 +File file4 added to patch patch1 +$ echo "This is file 4." > file4 +$ quilt refresh +Refreshed patch patch1 +$ quilt push +Applying patch2 +patching file dir/file3 + +$ quilt new subdir/patch3.diff +Patch subdir/patch3 is now on top +$ quilt add file4 +File file4 added to patch subdir/patch3 +$ rm file4 +$ quilt diff | sed -e "s/\\t.*//" +Index: test/file4 +--- test~subdir_patch3/file4 ++++ test/file4 +@@ -1 +0,0 @@ +-This is file 4. +$ quilt add -p patch2 file4 +File file4 modified by patch subdir/patch3 +$ quilt refresh +Refreshed patch subdir/patch3 +$ echo "Another line here, too." >> dir/file3 +$ quilt refresh patch2 +Refreshed patch patch2 +$ echo "Another line added." >> file2 +$ quilt diff -z -P patch1 | sed -e "s/\\t.*//" +Index: test/file2 +--- test.orig/file2 ++++ test/file2 +@@ -1 +1,2 @@ + This is file two. ++Another line added. +More recent patches modify files in patch1. +$ quilt refresh patch1 +More recent patches modify files in patch1. Enforce refresh with -f. +$ quilt refresh -f patch1 +Refreshed patch patch1 +$ echo "Another line here, too." >> dir/file3 +$ quilt pop +patching file file4 +Removed subdir/patch3, now at patch2 + +$ quilt refresh patch2 +Refreshed patch patch2 +$ quilt pop -qa +Removed patch2, now at patch1 +Removed patch1, no patches applied +$ rm -r dir patches |