Jasmine: Convert tests of parser's "zeroEscapeSequence" rule

redux
David Majda 13 years ago
parent 2b43f8ebb8
commit 2619becb9d

@ -72,6 +72,14 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical zeroEscapeSequence is "\\0". */
it("parses zeroEscapeSequence", function() {
expect('start = "\\0"').toParseAs(literalGrammar("\x00"));
expect('start = "\\00"').toFailToParse();
expect('start = "\\09"').toFailToParse();
});
/* Canonical hexEscapeSequence is "\\xFF". */
it("parses hexEscapeSequence", function() {
expect('start = "\\xFF"').toParseAs(literalGrammar("\xFF"));

@ -485,11 +485,4 @@ test("parses simpleEscapeSequence", function() {
parserParses('start = "\\a"', literalGrammar("a"));
});
/* Canonical zeroEscapeSequence is "\\0". */
test("parses zeroEscapeSequence", function() {
parserParses('start = "\\0"', literalGrammar("\x00"));
parserDoesNotParse('start = "\\00"');
parserDoesNotParse('start = "\\09"');
});
})();

Loading…
Cancel
Save