summaryrefslogtreecommitdiffstats
path: root/test/edit.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2015-02-18 13:00:02 +0100
committerJean Delvare <jdelvare@suse.de>2015-02-18 13:00:02 +0100
commit90459af8fa29670f0e3359c291aec46e34db9ce2 (patch)
tree4d43a416aa89d1e2855fcaab7205a6ee28c84e25 /test/edit.test
parentacebe0c18cd9d9b755fae5d6f071ca02f896270b (diff)
downloadquilt-90459af8fa29670f0e3359c291aec46e34db9ce2.tar.gz
edit: Use command "remove" to remove files
Commit f1c186ee renamed command "remove" to "revert". Commit bd1dfdab changed the semantics of command "revert". Commit 6d2501ac restored command "remove". However command "edit" is still calling command "revert" to remove files from the patch when it should be using command "remove". This case was not covered by the test suite, which is why the bug was not spotted earlier.
Diffstat (limited to 'test/edit.test')
-rw-r--r--test/edit.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/edit.test b/test/edit.test
index eabe752..daa30be 100644
--- a/test/edit.test
+++ b/test/edit.test
@@ -37,6 +37,17 @@ $ quilt files
$ quilt refresh
> Refreshed patch patches/patch
+# Test the behavior if the editor is called on a new file but
+# does not actually create it
+$ cat > editor
+< #! /bin/sh
+< echo Doing nothing to $1
+
+$ quilt edit nofoo
+> File nofoo added to patch patches/patch
+> Doing nothing to nofoo
+> File nofoo removed from patch patches/patch
+
# Test the behavior if the editor creates a brand new file
$ cat > editor
< #! /bin/sh