Mercurial > hg
comparison tests/test-run-tests.py @ 47573:75b623801f6a
run-tests: use a global WINDOWS constant instead of multiple tests
This should make the code clearer.
This required the adjustement of a hack in the code testing this code.
Differential Revision: https://phab.mercurial-scm.org/D11041
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 09 Jul 2021 15:39:43 +0200 |
parents | 2372284d9457 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
47572:da497189a93a | 47573:75b623801f6a |
---|---|
60 enable windows matching on any os | 60 enable windows matching on any os |
61 >>> _osaltsep = os.altsep | 61 >>> _osaltsep = os.altsep |
62 >>> os.altsep = True | 62 >>> os.altsep = True |
63 >>> _osname = os.name | 63 >>> _osname = os.name |
64 >>> os.name = 'nt' | 64 >>> os.name = 'nt' |
65 >>> _old_windows = run_tests.WINDOWS | |
66 >>> run_tests.WINDOWS = True | |
65 | 67 |
66 valid match on windows | 68 valid match on windows |
67 >>> lm(b'g/a*/d (glob)\n', b'g\\abc/d\n') | 69 >>> lm(b'g/a*/d (glob)\n', b'g\\abc/d\n') |
68 True | 70 True |
69 | 71 |
78 True | 80 True |
79 | 81 |
80 restore os.altsep | 82 restore os.altsep |
81 >>> os.altsep = _osaltsep | 83 >>> os.altsep = _osaltsep |
82 >>> os.name = _osname | 84 >>> os.name = _osname |
85 >>> run_tests.WINDOWS = _old_windows | |
83 """ | 86 """ |
84 pass | 87 pass |
85 | 88 |
86 | 89 |
87 def otherostests(): | 90 def otherostests(): |