| ... | ... | @@ -166,6 +166,48 @@ test "multiline string" { |
| 166 | 166 | expect(mem.eql(u8, s1, s2)); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | test "multiline string comments at start" { |
| 170 | const s1 = |
| 171 | //\\one |
| 172 | \\two) |
| 173 | \\three |
| 174 | ; |
| 175 | const s2 = "two)\nthree"; |
| 176 | expect(mem.eql(u8, s1, s2)); |
| 177 | } |
| 178 | |
| 179 | test "multiline string comments at end" { |
| 180 | const s1 = |
| 181 | \\one |
| 182 | \\two) |
| 183 | //\\three |
| 184 | ; |
| 185 | const s2 = "one\ntwo)"; |
| 186 | expect(mem.eql(u8, s1, s2)); |
| 187 | } |
| 188 | |
| 189 | test "multiline string comments in middle" { |
| 190 | const s1 = |
| 191 | \\one |
| 192 | //\\two) |
| 193 | \\three |
| 194 | ; |
| 195 | const s2 = "one\nthree"; |
| 196 | expect(mem.eql(u8, s1, s2)); |
| 197 | } |
| 198 | |
| 199 | test "multiline string comments at multiple places" { |
| 200 | const s1 = |
| 201 | \\one |
| 202 | //\\two |
| 203 | \\three |
| 204 | //\\four |
| 205 | \\five |
| 206 | ; |
| 207 | const s2 = "one\nthree\nfive"; |
| 208 | expect(mem.eql(u8, s1, s2)); |
| 209 | } |
| 210 | |
| 169 | 211 | test "multiline C string" { |
| 170 | 212 | const s1 = |
| 171 | 213 | \\one |