555 return True |
555 return True |
556 if (el and |
556 if (el and |
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 |
564 def tsttest(test, wd, options, replacements): |
566 def tsttest(test, wd, options, replacements): |
565 # We generate a shell script which outputs unique markers to line |
567 # We generate a shell script which outputs unique markers to line |
865 |
867 |
866 # Make a tmp subdirectory to work in |
868 # Make a tmp subdirectory to work in |
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 = '.' |
880 |
886 |
881 skipped = (ret == SKIPPED_STATUS) |
887 skipped = (ret == SKIPPED_STATUS) |