]> 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:

Strip redundant parentheses from assignment exprs (#1906)
[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 'Lots of \\\\\\\\\'quotes\''
47 f'{y * " "} \'{z}\''
48 f'{{y * " "}} \'{z}\''
49 f'\'{z}\' {y * " "}'
50 f'{y * x} \'{z}\''
51 '\'{z}\' {y * " "}'
52 '{y * x} \'{z}\''
53
54 # output
55
56 """"""
57 "'"
58 '"'
59 "'"
60 '"'
61 "Hello"
62 "Don't do that"
63 'Here is a "'
64 "What's the deal here?"
65 'What\'s the deal "here"?'
66 'And "here"?'
67 """Strings with "" in them"""
68 """Strings with "" in them"""
69 '''Here's a "'''
70 """Here's a " """
71 """Just a normal triple
72 quote"""
73 f"just a normal {f} string"
74 f"""This is a triple-quoted {f}-string"""
75 f'MOAR {" ".join([])}'
76 f"MOAR {' '.join([])}"
77 r"raw string ftw"
78 r"Date d\'expiration:(.*)"
79 r'Tricky "quote'
80 r"Not-so-tricky \"quote"
81 rf"{yay}"
82 "\nThe \"quick\"\nbrown fox\njumps over\nthe 'lazy' dog.\n"
83 re.compile(r'[\\"]')
84 "x = ''; y = \"\""
85 "x = '''; y = \"\""
86 "x = ''''; y = \"\""
87 "x = '' ''; y = \"\""
88 'x = \'\'; y = """'
89 'x = \'\'\'; y = """"'
90 'x = \'\'\'\'; y = """""'
91 'x = \'\' \'\'; y = """""'
92 'unnecessary ""escaping'
93 "unnecessary ''escaping"
94 '\\""'
95 "\\''"
96 "Lots of \\\\\\\\'quotes'"
97 f'{y * " "} \'{z}\''
98 f"{{y * \" \"}} '{z}'"
99 f'\'{z}\' {y * " "}'
100 f"{y * x} '{z}'"
101 "'{z}' {y * \" \"}"
102 "{y * x} '{z}'"