]> git.madduck.net Git - etc/vim.git/blob - tests/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:

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