···109109 assert_tokens(src, [
110110 token.TripleQuotedString(
111111 sigil: None,
112112+ number_of_quotes: 3,
112113 beginning_whitespace: " \n",
113114 lines: [
114115 "Hello, this is triple-quoted!",
···132133 assert_tokens(src, [
133134 token.TripleQuotedString(
134135 sigil: Some("b"),
136136+ number_of_quotes: 3,
135137 beginning_whitespace: "\n",
136138 lines: ["Hello", "This is a triple-quoted sigil"],
137139 end_indentation: " ",
140140+ ),
141141+ ])
142142+}
143143+144144+pub fn triple_quoted_string_more_quotes_test() {
145145+ let src =
146146+ "
147147+\"\"\"\"\"
148148+ This string has five quotes
149149+ so four are allowed:
150150+ \"\"\"\"
151151+ \"\"\"\"\"
152152+"
153153+154154+ assert_tokens(src, [
155155+ token.TripleQuotedString(
156156+ sigil: None,
157157+ number_of_quotes: 5,
158158+ beginning_whitespace: "\n",
159159+ lines: ["This string has five quotes", "so four are allowed:", "\"\"\"\""],
160160+ end_indentation: " ",
138161 ),
139162 ])
140163}
+12
test/tokens.txt
···2525 bye
2626 """
27272828+""""""
2929+ This string has six (6) quotes!
3030+ That means you can have five quotes just fine:
3131+ """""
3232+ And it's still valid. Six can also be here: """"""
3333+ """"""
3434+3535+~""""
3636+ Here's a sigil with more than 3 quotes
3737+ It works fine
3838+ """"
3939+2840after
2941begin
3042case