Patchwork [04,of,10] histedit-test: test malformed line

login
register
mail settings
Submitter Pierre-Yves David
Date April 18, 2013, 3:29 p.m.
Message ID <aefa522078d14fc1ac81.1366298959@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/1417/
State Accepted
Commit 52366b37f8978380bb9fd64924e5e473e7021ad4
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 1366285772 -7200
#      Thu Apr 18 13:49:32 2013 +0200
# Node ID aefa522078d14fc1ac815c18dba2884c648cd852
# Parent  c5c25ba5ed3adcda963433227e7cc37bdf30ebde
histedit-test: test malformed line

We had not 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
@@ -89,10 +89,21 @@  Test that extra revision are detected
   > pick 08d98a8350f3 4 five
   > EOF
   abort: may not use changesets other than the ones listed
   [255]
 
+Test malformed line
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > pickeb57da33312f2three
+  > pick c8e68270e35a 3 four
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: malformed line "pickeb57da33312f2three"
+  [255]
+
 Test short version of command
 ---------------------------------------
 
 Note: we use various number of white space between command name and changeset
 short hash. This test issue3893.