test/parser-test.js: Replace "\0" with "\x00"
Fixes the following JSHint errors: ./test/parser-test.js: line 353, col 54, Bad escapement. ./test/parser-test.js: line 384, col 54, Bad escapement. ./test/parser-test.js: line 436, col 60, Bad escapement. ./test/parser-test.js: line 437, col 60, Bad escapement. ./test/parser-test.js: line 472, col 50, Bad escapement.
This commit is contained in:
parent
934bfa5eef
commit
17f62ae9e3
|
@ -350,7 +350,7 @@ test("parses doubleQuotedLiteral", function() {
|
||||||
test("parses doubleQuotedCharacter", function() {
|
test("parses doubleQuotedCharacter", function() {
|
||||||
parserParses('start = "a"', literalGrammar("a"));
|
parserParses('start = "a"', literalGrammar("a"));
|
||||||
parserParses('start = "\\n"', literalGrammar("\n"));
|
parserParses('start = "\\n"', literalGrammar("\n"));
|
||||||
parserParses('start = "\\0"', literalGrammar("\0"));
|
parserParses('start = "\\0"', literalGrammar("\x00"));
|
||||||
parserParses('start = "\\x00"', literalGrammar("\x00"));
|
parserParses('start = "\\x00"', literalGrammar("\x00"));
|
||||||
parserParses('start = "\\u0120"', literalGrammar("\u0120"));
|
parserParses('start = "\\u0120"', literalGrammar("\u0120"));
|
||||||
parserParses('start = "\\\n"', literalGrammar("\n"));
|
parserParses('start = "\\\n"', literalGrammar("\n"));
|
||||||
|
@ -381,7 +381,7 @@ test("parses singleQuotedLiteral", function() {
|
||||||
test("parses singleQuotedCharacter", function() {
|
test("parses singleQuotedCharacter", function() {
|
||||||
parserParses("start = 'a'", literalGrammar("a"));
|
parserParses("start = 'a'", literalGrammar("a"));
|
||||||
parserParses("start = '\\n'", literalGrammar("\n"));
|
parserParses("start = '\\n'", literalGrammar("\n"));
|
||||||
parserParses("start = '\\0'", literalGrammar("\0"));
|
parserParses("start = '\\0'", literalGrammar("\x00"));
|
||||||
parserParses("start = '\\x00'", literalGrammar("\x00"));
|
parserParses("start = '\\x00'", literalGrammar("\x00"));
|
||||||
parserParses("start = '\\u0120'", literalGrammar("\u0120"));
|
parserParses("start = '\\u0120'", literalGrammar("\u0120"));
|
||||||
parserParses("start = '\\\n'", literalGrammar("\n"));
|
parserParses("start = '\\\n'", literalGrammar("\n"));
|
||||||
|
@ -433,8 +433,8 @@ test("parses classCharacter", function() {
|
||||||
test("parses bracketDelimitedCharacter", function() {
|
test("parses bracketDelimitedCharacter", function() {
|
||||||
parserParses("start = [a]", classGrammar(false, ["a"], "[a]"));
|
parserParses("start = [a]", classGrammar(false, ["a"], "[a]"));
|
||||||
parserParses("start = [\\n]", classGrammar(false, ["\n"], "[\\n]"));
|
parserParses("start = [\\n]", classGrammar(false, ["\n"], "[\\n]"));
|
||||||
parserParses("start = [\\0]", classGrammar(false, ["\0"], "[\\0]"));
|
parserParses("start = [\\0]", classGrammar(false, ["\x00"], "[\\0]"));
|
||||||
parserParses("start = [\\x00]", classGrammar(false, ["\0"], "[\\0]"));
|
parserParses("start = [\\x00]", classGrammar(false, ["\x00"], "[\\0]"));
|
||||||
parserParses("start = [\\u0120]", classGrammar(false, ["\u0120"], "[\\u0120]"));
|
parserParses("start = [\\u0120]", classGrammar(false, ["\u0120"], "[\\u0120]"));
|
||||||
parserParses("start = [\\\n]", classGrammar(false, ["\n"], "[\\n]"));
|
parserParses("start = [\\\n]", classGrammar(false, ["\n"], "[\\n]"));
|
||||||
});
|
});
|
||||||
|
@ -469,7 +469,7 @@ test("parses simpleEscapeSequence", function() {
|
||||||
|
|
||||||
/* Canonical zeroEscapeSequence is "\\0". */
|
/* Canonical zeroEscapeSequence is "\\0". */
|
||||||
test("parses zeroEscapeSequence", function() {
|
test("parses zeroEscapeSequence", function() {
|
||||||
parserParses('start = "\\0"', literalGrammar("\0"));
|
parserParses('start = "\\0"', literalGrammar("\x00"));
|
||||||
parserDoesNotParse('start = "\\00"');
|
parserDoesNotParse('start = "\\00"');
|
||||||
parserDoesNotParse('start = "\\09"');
|
parserDoesNotParse('start = "\\09"');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue