tests/run-tests.py
branchstable
changeset 1320 b82811d8ce22
parent 1319 b5ce8c72ddf9
child 1321 79f68c0ed71e
equal deleted inserted replaced
1319:b5ce8c72ddf9 1320:b82811d8ce22
   636             return True
   636             return True
   637         if el.endswith(" (re)\n"):
   637         if el.endswith(" (re)\n"):
   638             return rematch(el[:-6], l)
   638             return rematch(el[:-6], l)
   639         if el.endswith(" (glob)\n"):
   639         if el.endswith(" (glob)\n"):
   640             return globmatch(el[:-8], l)
   640             return globmatch(el[:-8], l)
       
   641         if os.altsep and l.replace('\\', '/') == el:
       
   642             return '+glob'
   641     return False
   643     return False
   642 
   644 
   643 def tsttest(test, wd, options, replacements, env):
   645 def tsttest(test, wd, options, replacements, env):
   644     # We generate a shell script which outputs unique markers to line
   646     # We generate a shell script which outputs unique markers to line
   645     # up script results with our source. These markers include input
   647     # up script results with our source. These markers include input
   789             # find the expected output at the current position
   791             # find the expected output at the current position
   790             el = None
   792             el = None
   791             if pos in expected and expected[pos]:
   793             if pos in expected and expected[pos]:
   792                 el = expected[pos].pop(0)
   794                 el = expected[pos].pop(0)
   793 
   795 
   794             if linematch(el, lout):
   796             r = linematch(el, lout)
       
   797             if isinstance(r, str):
       
   798                 if r == '+glob':
       
   799                     lout = el[:-1] + ' (glob)\n'
       
   800                 r = False
       
   801             if r:
   795                 postout.append("  " + el)
   802                 postout.append("  " + el)
   796             else:
   803             else:
   797                 if needescape(lout):
   804                 if needescape(lout):
   798                     lout = stringescape(lout.rstrip('\n')) + " (esc)\n"
   805                     lout = stringescape(lout.rstrip('\n')) + " (esc)\n"
   799                 postout.append("  " + lout) # let diff deal with it
   806                 postout.append("  " + lout) # let diff deal with it