##// END OF EJS Templates
tests: ignore \r on windows
Mads Kiilerich -
r15449:f71d60da default
parent child Browse files
Show More
@@ -557,7 +557,9 b' def linematch(el, l):'
557 (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', l) or
557 (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', l) or
558 el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', l) or
558 el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', l) or
559 el.endswith(" (esc)\n") and
559 el.endswith(" (esc)\n") and
560 el[:-7].decode('string-escape') + '\n' == l)):
560 (el[:-7].decode('string-escape') + '\n' == l or
561 el[:-7].decode('string-escape').replace('\r', '') +
562 '\n' == l and os.name == 'nt'))):
561 return True
563 return True
562 return False
564 return False
563
565
@@ -867,13 +869,17 b' def runone(options, test):'
867 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
869 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
868 os.path.join(HGTMP, os.path.basename(test)).replace('\\', '/')
870 os.path.join(HGTMP, os.path.basename(test)).replace('\\', '/')
869
871
870 os.mkdir(testtmp)
872 replacements = [
871 ret, out = runner(testpath, testtmp, options, [
872 (re.escape(testtmp), '$TESTTMP'),
873 (re.escape(testtmp), '$TESTTMP'),
873 (r':%s\b' % options.port, ':$HGPORT'),
874 (r':%s\b' % options.port, ':$HGPORT'),
874 (r':%s\b' % (options.port + 1), ':$HGPORT1'),
875 (r':%s\b' % (options.port + 1), ':$HGPORT1'),
875 (r':%s\b' % (options.port + 2), ':$HGPORT2'),
876 (r':%s\b' % (options.port + 2), ':$HGPORT2'),
876 ])
877 ]
878 if os.name == 'nt':
879 replacements.append((r'\r\n', '\n'))
880
881 os.mkdir(testtmp)
882 ret, out = runner(testpath, testtmp, options, replacements)
877 vlog("# Ret was:", ret)
883 vlog("# Ret was:", ret)
878
884
879 mark = '.'
885 mark = '.'
General Comments 0
You need to be logged in to leave comments. Login now