Show More
@@ -95,7 +95,7 b" __all__ = ['Completer','IPCompleter']" | |||||
95 | if sys.platform == 'win32': |
|
95 | if sys.platform == 'win32': | |
96 | PROTECTABLES = ' ' |
|
96 | PROTECTABLES = ' ' | |
97 | else: |
|
97 | else: | |
98 | PROTECTABLES = ' ()' |
|
98 | PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^&' | |
99 |
|
99 | |||
100 | #----------------------------------------------------------------------------- |
|
100 | #----------------------------------------------------------------------------- | |
101 | # Main functions and classes |
|
101 | # Main functions and classes |
@@ -24,11 +24,25 b' def test_protect_filename():' | |||||
24 | ('a bc',r'a\ \ bc'), |
|
24 | ('a bc',r'a\ \ bc'), | |
25 | (' bc',r'\ \ bc'), |
|
25 | (' bc',r'\ \ bc'), | |
26 | ] |
|
26 | ] | |
27 | # On posix, we also protect parens |
|
27 | # On posix, we also protect parens and other special characters | |
28 | if sys.platform != 'win32': |
|
28 | if sys.platform != 'win32': | |
29 | pairs.extend( [('a(bc',r'a\(bc'), |
|
29 | pairs.extend( [('a(bc',r'a\(bc'), | |
30 | ('a)bc',r'a\)bc'), |
|
30 | ('a)bc',r'a\)bc'), | |
31 | ('a( )bc',r'a\(\ \)bc'), |
|
31 | ('a( )bc',r'a\(\ \)bc'), | |
|
32 | ('a[1]bc', r'a\[1\]bc'), | |||
|
33 | ('a{1}bc', r'a\{1\}bc'), | |||
|
34 | ('a#bc', r'a\#bc'), | |||
|
35 | ('a?bc', r'a\?bc'), | |||
|
36 | ('a=bc', r'a\=bc'), | |||
|
37 | ('a\\bc', r'a\\bc'), | |||
|
38 | ('a|bc', r'a\|bc'), | |||
|
39 | ('a;bc', r'a\;bc'), | |||
|
40 | ('a:bc', r'a\:bc'), | |||
|
41 | ("a'bc", r"a\'bc"), | |||
|
42 | ('a*bc', r'a\*bc'), | |||
|
43 | ('a"bc', r'a\"bc'), | |||
|
44 | ('a^bc', r'a\^bc'), | |||
|
45 | ('a&bc', r'a\&bc'), | |||
32 | ] ) |
|
46 | ] ) | |
33 | # run the actual tests |
|
47 | # run the actual tests | |
34 | for s1, s2 in pairs: |
|
48 | for s1, s2 in pairs: |
General Comments 0
You need to be logged in to leave comments.
Login now