##// END OF EJS Templates
tests: handle .t files without trailing LF...
Mads Kiilerich -
r12934:ea7ad8c3 stable
parent child Browse files
Show More
@@ -464,6 +464,8 b' def tsttest(test, options, replacements)'
464 after = {}
464 after = {}
465 expected = {}
465 expected = {}
466 for n, l in enumerate(t):
466 for n, l in enumerate(t):
467 if not l.endswith('\n'):
468 l += '\n'
467 if l.startswith(' $ '): # commands
469 if l.startswith(' $ '): # commands
468 after.setdefault(pos, []).append(l)
470 after.setdefault(pos, []).append(l)
469 prepos = pos
471 prepos = pos
@@ -480,8 +482,6 b' def tsttest(test, options, replacements)'
480 # non-command/result - queue up for merged output
482 # non-command/result - queue up for merged output
481 after.setdefault(pos, []).append(l)
483 after.setdefault(pos, []).append(l)
482
484
483 if script and not script[-1].endswith('\n'):
484 script[-1] = script[-1] + '\n'
485 script.append('echo %s %s $?\n' % (salt, n + 1))
485 script.append('echo %s %s $?\n' % (salt, n + 1))
486
486
487 fd, name = tempfile.mkstemp(suffix='hg-tst')
487 fd, name = tempfile.mkstemp(suffix='hg-tst')
@@ -302,5 +302,3 b" After qrecord b.patch 'tip'"
302 After qrecord b.patch 'diff'
302 After qrecord b.patch 'diff'
303
303
304 $ hg diff --nodates
304 $ hg diff --nodates
305
306 End No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now