##// END OF EJS Templates
match: stabilize _rootsdirsandparents doctest...
marmoute -
r42559:96fc696a default
parent child Browse files
Show More
@@ -1380,21 +1380,25 b' def _rootsdirsandparents(kindpats):'
1380 1380
1381 1381 Returns a tuple of (roots, dirs, parents).
1382 1382
1383 >>> _rootsdirsandparents(
1383 >>> r = _rootsdirsandparents(
1384 1384 ... [(b'glob', b'g/h/*', b''), (b'glob', b'g/h', b''),
1385 1385 ... (b'glob', b'g*', b'')])
1386 (['g/h', 'g/h', ''], [], set(['', 'g']))
1387 >>> _rootsdirsandparents(
1386 >>> print(r[0:2], sorted(r[2])) # the set has an unstable output
1387 (['g/h', 'g/h', ''], []) ['', 'g']
1388 >>> r = _rootsdirsandparents(
1388 1389 ... [(b'rootfilesin', b'g/h', b''), (b'rootfilesin', b'', b'')])
1389 ([], ['g/h', ''], set(['', 'g']))
1390 >>> _rootsdirsandparents(
1390 >>> print(r[0:2], sorted(r[2])) # the set has an unstable output
1391 ([], ['g/h', '']) ['', 'g']
1392 >>> r = _rootsdirsandparents(
1391 1393 ... [(b'relpath', b'r', b''), (b'path', b'p/p', b''),
1392 1394 ... (b'path', b'', b'')])
1393 (['r', 'p/p', ''], [], set(['', 'p']))
1394 >>> _rootsdirsandparents(
1395 >>> print(r[0:2], sorted(r[2])) # the set has an unstable output
1396 (['r', 'p/p', ''], []) ['', 'p']
1397 >>> r = _rootsdirsandparents(
1395 1398 ... [(b'relglob', b'rg*', b''), (b're', b're/', b''),
1396 1399 ... (b'relre', b'rr', b'')])
1397 (['', '', ''], [], set(['']))
1400 >>> print(r[0:2], sorted(r[2])) # the set has an unstable output
1401 (['', '', ''], []) ['']
1398 1402 '''
1399 1403 r, d = _patternrootsanddirs(kindpats)
1400 1404
General Comments 0
You need to be logged in to leave comments. Login now