##// END OF EJS Templates
run-tests: make it possible to combine (esc) with (glob) and (re)...
Mads Kiilerich -
r17778:80fe6458 default
parent child Browse files
Show More
@@ -526,13 +526,13 b' def globmatch(el, l):'
526 def linematch(el, l):
526 def linematch(el, l):
527 if el == l: # perfect match (fast)
527 if el == l: # perfect match (fast)
528 return True
528 return True
529 if (el and
529 if el:
530 (el.endswith(" (re)\n") and rematch(el[:-6], l) or
530 if el.endswith(" (esc)\n"):
531 el.endswith(" (glob)\n") and globmatch(el[:-8], l) or
531 el = el[:-7].decode('string-escape') + '\n'
532 el.endswith(" (esc)\n") and
532 if el == l or os.name == 'nt' and el[:-1] + '\r\n' == l:
533 (el[:-7].decode('string-escape') + '\n' == l or
533 return True
534 os.name == 'nt' and
534 if (el.endswith(" (re)\n") and rematch(el[:-6], l) or
535 el[:-7].decode('string-escape') + '\n' == l))):
535 el.endswith(" (glob)\n") and globmatch(el[:-8], l)):
536 return True
536 return True
537 return False
537 return False
538
538
@@ -62,6 +62,18 b' Windows: \\r\\n is handled like \\n and can'
62 crcrlf\r (esc)
62 crcrlf\r (esc)
63 #endif
63 #endif
64
64
65 Combining esc with other markups - and handling lines ending with \r instead of \n:
66
67 $ printf 'foo/bar\r'
68 foo/bar\r (no-eol) (glob) (esc)
69 #if windows
70 $ printf 'foo\\bar\r'
71 foo/bar\r (no-eol) (glob) (esc)
72 #endif
73 $ printf 'foo/bar\rfoo/bar\r'
74 foo.bar\r \(no-eol\) (re) (esc)
75 foo.bar\r \(no-eol\) (re)
76
65 testing hghave
77 testing hghave
66
78
67 $ "$TESTDIR/hghave" true
79 $ "$TESTDIR/hghave" true
General Comments 0
You need to be logged in to leave comments. Login now