File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,50 @@ describe('Lexer', () => {
288
288
end : 65 ,
289
289
value : 'string with unicode code point outside BMP escaped 😀' ,
290
290
} ) ;
291
+
292
+ expect (
293
+ lexOne (
294
+ '"string with unicode code point outside BMP escaped \\uD800\\uDC00"' ,
295
+ ) ,
296
+ ) . to . contain ( {
297
+ kind : TokenKind . STRING ,
298
+ start : 0 ,
299
+ end : 65 ,
300
+ value : 'string with unicode code point outside BMP escaped \uD800\uDC00' ,
301
+ } ) ;
302
+
303
+ expect (
304
+ lexOne (
305
+ '"string with unicode code point outside BMP escaped \\uDBFF\\uDC00"' ,
306
+ ) ,
307
+ ) . to . contain ( {
308
+ kind : TokenKind . STRING ,
309
+ start : 0 ,
310
+ end : 65 ,
311
+ value : 'string with unicode code point outside BMP escaped \uDBFF\uDC00' ,
312
+ } ) ;
313
+
314
+ expect (
315
+ lexOne (
316
+ '"string with unicode code point outside BMP escaped \\uDBFF\\uDFFF"' ,
317
+ ) ,
318
+ ) . to . contain ( {
319
+ kind : TokenKind . STRING ,
320
+ start : 0 ,
321
+ end : 65 ,
322
+ value : 'string with unicode code point outside BMP escaped \uDBFF\uDFFF' ,
323
+ } ) ;
324
+
325
+ expect (
326
+ lexOne (
327
+ '"string with unicode code point outside BMP escaped \\uD800\\uDFFF"' ,
328
+ ) ,
329
+ ) . to . contain ( {
330
+ kind : TokenKind . STRING ,
331
+ start : 0 ,
332
+ end : 65 ,
333
+ value : 'string with unicode code point outside BMP escaped \uD800\uDFFF' ,
334
+ } ) ;
291
335
} ) ;
292
336
293
337
it ( 'lex reports useful string errors' , ( ) => {
You can’t perform that action at this time.
0 commit comments