mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
new path tests
This commit is contained in:
parent
eff262629a
commit
aff0a090ce
2 changed files with 6 additions and 1 deletions
5
tests/test_path_completers.py
Normal file
5
tests/test_path_completers.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
import xonsh.completers.path as xcp
|
||||
|
||||
def test_pattern_need_quotes():
|
||||
# just make sure the regex compiles
|
||||
xcp.PATTERN_NEED_QUOTES.match('')
|
|
@ -14,7 +14,7 @@ from xonsh.completers.tools import get_filter_function
|
|||
def PATTERN_NEED_QUOTES():
|
||||
pattern = r'\s`\$\{\}\,\*\(\)"\'\?&'
|
||||
if xp.ON_WINDOWS:
|
||||
pattern.append('%')
|
||||
pattern += '%'
|
||||
pattern = '[' + pattern + ']' + r'|\band\b|\bor\b'
|
||||
return re.compile(pattern)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue