63 lines
No EOL
1.5 KiB
Text
63 lines
No EOL
1.5 KiB
Text
==== tests/cases/compiler/stringLiteralsErrors.ts (17 errors) ====
|
|
// Srtings missing line terminator
|
|
var es1 = "line 1
|
|
|
|
!!! Unterminated string constant.
|
|
";
|
|
|
|
!!! Unterminated string constant.
|
|
var es2 = 'line 1
|
|
|
|
!!! Unterminated string constant.
|
|
';
|
|
|
|
!!! Unterminated string constant.
|
|
|
|
// Space after backslash
|
|
var es3 = 'line 1\
|
|
|
|
!!! Unterminated string constant.
|
|
';
|
|
|
|
!!! Unterminated string constant.
|
|
var es4 = 'line 1\
|
|
|
|
!!! Unterminated string constant.
|
|
';
|
|
|
|
!!! Unterminated string constant.
|
|
|
|
// Unterminated strings
|
|
var es5 = "unterminated
|
|
|
|
!!! Unterminated string constant.
|
|
var es6 = 'unterminated
|
|
|
|
!!! Unterminated string constant.
|
|
|
|
// wrong terminator
|
|
var es7 = "unterminated '
|
|
|
|
!!! Unterminated string constant.
|
|
var es8 = 'unterminated "
|
|
|
|
!!! Unterminated string constant.
|
|
|
|
// wrong unicode sequences
|
|
var es9 = "\u00";
|
|
|
|
!!! Hexadecimal digit expected.
|
|
var es10 = "\u00GG";
|
|
|
|
!!! Hexadecimal digit expected.
|
|
var es11 = "\x0";
|
|
|
|
!!! Hexadecimal digit expected.
|
|
var es12 = "\xmm";
|
|
|
|
!!! Hexadecimal digit expected.
|
|
|
|
// End of file
|
|
var es13 = "
|
|
|
|
!!! Unexpected end of text. |