Patchwork [06,of,10] histedit-test: test unknown command

login
register
mail settings
Submitter Pierre-Yves David
Date April 18, 2013, 3:29 p.m.
Message ID <bba287fd0cbf99b1ee8a.1366298961@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/1421/
State Accepted
Commit f77c23ec09f77aa5946614e362744b97a77345a3
Headers show

Comments

Pierre-Yves David - April 18, 2013, 3:29 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1366285887 -7200
#      Thu Apr 18 13:51:27 2013 +0200
# Node ID bba287fd0cbf99b1ee8a5297a054b7100f9338b4
# Parent  4bb8ea96798d4c8634cf2def42f741954b7fb8c7
histedit-test: test unknown command

We had no test for this case.

Patch

diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -111,10 +111,21 @@  Test unknown changeset
   > pick 08d98a8350f3 4 five
   > EOF
   abort: unknown changeset 0123456789ab listed
   [255]
 
+Test unknown command
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > coin eb57da33312f 2 three
+  > pick c8e68270e35a 3 four
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: unknown action "coin"
+  [255]
+
 Test short version of command
 ---------------------------------------
 
 Note: we use various number of white space between command name and changeset
 short hash. This test issue3893.