summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/subdir.test19
-rw-r--r--test/three.test18
2 files changed, 37 insertions, 0 deletions
diff --git a/test/subdir.test b/test/subdir.test
index 7310616..7fb28e1 100644
--- a/test/subdir.test
+++ b/test/subdir.test
@@ -58,5 +58,24 @@
> @@ -1 +0,0 @@
> -yet another file
+ # Test diff called with multiple file names, from a subdirectory
+ $ quilt diff --no-index -p ab file file2 no
+ > --- a/subdir/file
+ > +++ b/subdir/file
+ > @@ -1 +1 @@
+ > -old file
+ > +new contents
+ > --- /dev/null
+ > +++ b/subdir/file2
+ > @@ -0,0 +1 @@
+ > +another file
+
+ # Test diff called with "./" file name prefix, from a subdirectory
+ $ quilt diff --no-index -p ab ./file3 ./no
+ > --- a/subdir/file3
+ > +++ /dev/null
+ > @@ -1 +0,0 @@
+ > -yet another file
+
$ quilt refresh
> Refreshed patch %{_P}test.patch
diff --git a/test/three.test b/test/three.test
index 204b1c1..7abc835 100644
--- a/test/three.test
+++ b/test/three.test
@@ -61,6 +61,24 @@
$ quilt refresh
> Refreshed patch %{P}patch2.diff
+ # Test diff called with multiple file names
+ $ quilt diff -p0 f g
+ > Index: g
+ > ===================================================================
+ > --- /dev/null
+ > +++ g
+ > @@ -0,0 +1 @@
+ > +g
+
+ # Test that diff strips the "./" prefix
+ $ quilt diff -p0 ./f ./g
+ > Index: g
+ > ===================================================================
+ > --- /dev/null
+ > +++ g
+ > @@ -0,0 +1 @@
+ > +g
+
$ quilt pop
> Removing patch patches/patch2.diff
> Removing g