summaryrefslogtreecommitdiffstats
path: root/test/conflicts.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2013-12-17 15:03:51 +0100
committerJean Delvare <jdelvare@suse.de>2013-12-17 15:03:51 +0100
commitd35030c2a4475aab71d1e78e73452daba1911e1a (patch)
treec8e0019b0a86d0ae454814b91c9ed315595b06fd /test/conflicts.test
parent26a975046f1b75261bee61735da2da4f779b9409 (diff)
downloadquilt-d35030c2a4475aab71d1e78e73452daba1911e1a.tar.gz
test: Record the status returned by every command
- test/run: Record the status returned by every command, so that test cases can check them. - test/*.text: Test the status returned by all commands in 4 test cases.
Diffstat (limited to 'test/conflicts.test')
-rw-r--r--test/conflicts.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/conflicts.test b/test/conflicts.test
index bfd66fa..21c8499 100644
--- a/test/conflicts.test
+++ b/test/conflicts.test
@@ -23,37 +23,53 @@ anymore, then the patch is fixed.
$ quilt new a.diff
> Patch %{P}a.diff is now on top
+ $ echo %{?}
+ > 0
$ quilt add one.txt
> File one.txt added to patch %{P}a.diff
+ $ echo %{?}
+ > 0
$ mv one.txt one.orig
$ sed -e "s/4/4+/" -e 's/d/d+/' one.orig > one.txt
$ quilt refresh
> Refreshed patch %{P}a.diff
+ $ echo %{?}
+ > 0
$ quilt pop -q
> Removing patch %{P}a.diff
> No patches applied
+ $ echo %{?}
+ > 0
$ sed -e "s/^\\([17]\\)\$/\\1-/" one.orig > one.txt
$ quilt push -q
> Applying patch %{P}a.diff
> Now at patch %{P}a.diff
+ $ echo %{?}
+ > 0
$ quilt pop -q
> Removing patch %{P}a.diff
> No patches applied
+ $ echo %{?}
+ > 0
$ sed -e "s/^\\([1267]\\)\$/\\1-/" one.orig > one.txt
$ quilt push -q
> Applying patch %{P}a.diff
> Now at patch %{P}a.diff
+ $ echo %{?}
+ > 0
$ quilt pop -q
> Removing patch %{P}a.diff
> No patches applied
+ $ echo %{?}
+ > 0
$ sed -e "s/^\\([123567]\\)\$/\\1-/" one.orig > one.txt
@@ -61,11 +77,15 @@ anymore, then the patch is fixed.
> Applying patch %{P}a.diff
> 1 out of 2 hunks FAILED
> Patch %{P}a.diff does not apply (enforce with -f)
+ $ echo %{?}
+ > 1
$ quilt push -qf
> Applying patch %{P}a.diff
>~ 1 out of 2 hunks FAILED -- saving rejects to (file )?`?one.txt.rej'?
> Applied patch %{P}a.diff (forced; needs refresh)
+ $ echo %{?}
+ > 1
$ mv one.txt one.x
$ sed -e "s/4/4+/" one.x > one.txt
@@ -82,6 +102,8 @@ anymore, then the patch is fixed.
> 5-
> 6-
> 7-
+ $ echo %{?}
+ > 0
$ quilt diff | grep -v "^\\(---\\|+++\\)"
>~ Index: [^/]+/one\.txt
@@ -104,9 +126,13 @@ anymore, then the patch is fixed.
> e
> f
> g
+ $ echo %{?}
+ > 0
$ quilt refresh
> Refreshed patch %{P}a.diff
+ $ echo %{?}
+ > 0
$ cat patches/a.diff | grep -v "^\\(---\\|+++\\)"
>~ Index: [^/]+/one\.txt
@@ -133,3 +159,5 @@ anymore, then the patch is fixed.
$ quilt pop -q
> Removing patch %{P}a.diff
> No patches applied
+ $ echo %{?}
+ > 0