[Bug 4403] New: run-tests.py isn't robust to forgetting '>' in multiline commands

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Oct 10 13:51:55 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4403

          Priority: normal
            Bug ID: 4403
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: run-tests.py isn't robust to forgetting '>' in
                    multiline commands
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: mkoconnor at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.0.2
         Component: Mercurial
           Product: Mercurial

If in a .t file, you have a multiline command but forget the >, say for
example:

  $ echo hello \
    there
  hello there

instead of 

  $ echo hello \
  > there
  hello there

then you will get undefined behavior: a Python backtrace might be raised, the
output might be wrong, or the test might even unexpectedly pass.  For example,
this test incorrectly passes:

  $ echo hello \
  hello echo  (no-eol)

I believe this is because run-tests.py intersperses the test's commands with
'echo SALT...' commands and if a test's command ends with a backslash it will
capture the 'echo SALT...' command.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list