]> git.madduck.net Git - etc/vim.git/blob - tests/data/string_quotes.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

fix handling of empty triple quoted strings (#314)
[etc/vim.git] / tests / data / string_quotes.py
1 ''''''
2 '\''
3 '"'
4 "'"
5 "\""
6 "Hello"
7 "Don't do that"
8 'Here is a "'
9 'What\'s the deal here?'
10 "What's the deal \"here\"?"
11 "And \"here\"?"
12 """Strings with "" in them"""
13 '''Strings with "" in them'''
14 '''Here's a "'''
15 '''Here's a " '''
16 '''Just a normal triple
17 quote'''
18 f"just a normal {f} string"
19 f'''This is a triple-quoted {f}-string'''
20 f'MOAR {" ".join([])}'
21 f"MOAR {' '.join([])}"
22 r"raw string ftw"
23 r'Date d\'expiration:(.*)'
24 r'Tricky "quote'
25 r'Not-so-tricky \"quote'
26 rf'{yay}'
27 '\n\
28 The \"quick\"\n\
29 brown fox\n\
30 jumps over\n\
31 the \'lazy\' dog.\n\
32 '
33 re.compile(r'[\\"]')
34 "x = ''; y = \"\""
35 "x = '''; y = \"\""
36 "x = ''''; y = \"\""
37 "x = '' ''; y = \"\""
38 "x = ''; y = \"\"\""
39 "x = '''; y = \"\"\"\""
40 "x = ''''; y = \"\"\"\"\""
41 "x = '' ''; y = \"\"\"\"\""
42 'unnecessary \"\"escaping'
43 "unnecessary \'\'escaping"
44 '\\""'
45 "\\''"
46
47 # output
48
49 """"""
50 "'"
51 '"'
52 "'"
53 '"'
54 "Hello"
55 "Don't do that"
56 'Here is a "'
57 "What's the deal here?"
58 'What\'s the deal "here"?'
59 'And "here"?'
60 """Strings with "" in them"""
61 """Strings with "" in them"""
62 '''Here's a "'''
63 """Here's a " """
64 """Just a normal triple
65 quote"""
66 f"just a normal {f} string"
67 f"""This is a triple-quoted {f}-string"""
68 f'MOAR {" ".join([])}'
69 f"MOAR {' '.join([])}"
70 r"raw string ftw"
71 r"Date d\'expiration:(.*)"
72 r'Tricky "quote'
73 r"Not-so-tricky \"quote"
74 rf"{yay}"
75 "\n\
76 The \"quick\"\n\
77 brown fox\n\
78 jumps over\n\
79 the 'lazy' dog.\n\
80 "
81 re.compile(r'[\\"]')
82 "x = ''; y = \"\""
83 "x = '''; y = \"\""
84 "x = ''''; y = \"\""
85 "x = '' ''; y = \"\""
86 'x = \'\'; y = """'
87 'x = \'\'\'; y = """"'
88 'x = \'\'\'\'; y = """""'
89 'x = \'\' \'\'; y = """""'
90 'unnecessary ""escaping'
91 "unnecessary ''escaping"
92 '\\""'
93 "\\''"