~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/script.py

  • Committer: Martin Pool
  • Date: 2010-09-13 04:20:14 UTC
  • mto: (5416.1.7 ui-factory)
  • mto: This revision was merged to the branch mainline in revision 5422.
  • Revision ID: mbp@sourcefrog.net-20100913042014-9ia1c0b2cv8mxpyc
ScriptRunner can now cope with commands that prompt for input.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
            # 'expected' parameter. So we just fallback to our good old
233
233
            # assertEqualDiff since we know there *are* differences and the
234
234
            # output should be decently readable.
235
 
            test_case.assertEqualDiff(expected, actual)
 
235
            #
 
236
            # As a special case, we allow output that's missing a final
 
237
            # newline to match an expected string that does have one, so that
 
238
            # we can match a prompt printed on one line, then input given on
 
239
            # the next line.
 
240
            if expected == actual + '\n':
 
241
                pass
 
242
            else:
 
243
                test_case.assertEqualDiff(expected, actual)
236
244
 
237
245
    def _pre_process_args(self, args):
238
246
        new_args = []