Signed-off-by: Michal Marek <mma...@suse.cz>
---
 test/git.test | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 test/git.test

diff --git a/test/git.test b/test/git.test
new file mode 100644
index 0000000..78bf34c
--- /dev/null
+++ b/test/git.test
@@ -0,0 +1,72 @@
+       $ mkdir patches
+
+       $ mkdir dir
+       $ quilt new patch1.diff
+       > Patch %{P}patch1.diff is now on top
+       $ quilt add dir/file
+       > File dir/file added to patch %{P}patch1.diff
+       $ echo "First line." > dir/file
+       $ quilt diff --git
+       > diff --git a/dir/file b/dir/file
+       > new file mode 100644
+       > index 0000000..f1130ce
+       > --- /dev/null
+       > +++ b/dir/file
+       > @@ -0,0 +1 @@
+       > +First line.
+       $ quilt refresh --git
+       > Refreshed patch patches/patch1.diff
+
+       $ quilt new patch2.diff
+       > Patch patches/patch2.diff is now on top
+       $ quilt add dir/file
+       > File dir/file added to patch %{P}patch2.diff
+       $ echo "Second line." >> dir/file
+       $ quilt diff --git
+       > diff --git a/dir/file b/dir/file
+       > index f1130ce..41ccd97 100644
+       > --- a/dir/file
+       > +++ b/dir/file
+       > @@ -1 +1,2 @@
+       >  First line.
+       > +Second line.
+       $ quilt refresh --git
+       > Refreshed patch patches/patch2.diff
+
+       $ quilt new patch3.diff
+       > Patch patches/patch3.diff is now on top
+       $ quilt add dir/file
+       > File dir/file added to patch %{P}patch3.diff
+       $ chmod +x dir/file
+       $ echo "Third line." >> dir/file
+       $ quilt diff --git
+       > diff --git a/dir/file b/dir/file
+       > old mode 100644
+       > new mode 100755
+       > index 41ccd97..44233cd
+       > --- a/dir/file
+       > +++ b/dir/file
+       > @@ -1,2 +1,3 @@
+       >  First line.
+       >  Second line.
+       > +Third line.
+       $ quilt refresh --git
+       > Refreshed patch patches/patch3.diff
+
+       $ quilt new patch4.diff
+       > Patch patches/patch4.diff is now on top
+       $ quilt add dir/file
+       > File dir/file added to patch %{P}patch4.diff
+       $ rm dir/file
+       $ quilt diff --git
+       > diff --git a/dir/file b/dir/file
+       > deleted file mode 100755
+       > index 44233cd..0000000
+       > --- a/dir/file
+       > +++ /dev/null
+       > @@ -1,3 +0,0 @@
+       > -First line.
+       > -Second line.
+       > -Third line.
+
+
-- 
2.1.4


_______________________________________________
Quilt-dev mailing list
Quilt-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to