Merge pull request #905 from avdg/unit-tests

Add unit tests
This commit is contained in:
Richard van Velzen
2016-01-14 08:54:40 +01:00
5 changed files with 69 additions and 2 deletions

View File

@@ -399,7 +399,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8));
else ch = read_escaped_char(true);
}
else if (ch == "\n") parse_error("Unterminated string constant");
else if ("\r\n\u2028\u2029".indexOf(ch) >= 0) parse_error("Unterminated string constant");
else if (ch == quote) break;
ret += ch;
}