Jasmine: Convert tests of parser's "__" rule
This commit is contained in:
parent
fadaef84dd
commit
3bc61c4c50
|
@ -68,6 +68,15 @@ describe("PEG.js grammar parser", function() {
|
|||
});
|
||||
});
|
||||
|
||||
/* Canonical __ is "\n". */
|
||||
it("parses __", function() {
|
||||
expect('start ="abcd"' ).toParseAs(trivialGrammar);
|
||||
expect('start = "abcd"' ).toParseAs(trivialGrammar);
|
||||
expect('start =\n"abcd"' ).toParseAs(trivialGrammar);
|
||||
expect('start =/* comment */"abcd"').toParseAs(trivialGrammar);
|
||||
expect('start = "abcd"' ).toParseAs(trivialGrammar);
|
||||
});
|
||||
|
||||
// Canonical comment is "/* comment */".
|
||||
it("parses comment", function() {
|
||||
expect('start =// comment\n"abcd"' ).toParseAs(trivialGrammar);
|
||||
|
|
|
@ -525,15 +525,6 @@ test("parses eolEscapeSequence", function() {
|
|||
parserParses('start = "\\\u2029"', literalGrammar("\u2029"));
|
||||
});
|
||||
|
||||
/* Canonical __ is "\n". */
|
||||
test("parses __", function() {
|
||||
parserParses('start ="abcd"', simpleGrammar);
|
||||
parserParses('start = "abcd"', simpleGrammar);
|
||||
parserParses('start =\n"abcd"', simpleGrammar);
|
||||
parserParses('start =/* comment */"abcd"', simpleGrammar);
|
||||
parserParses('start = "abcd"', simpleGrammar);
|
||||
});
|
||||
|
||||
/* Trivial character class rules are not tested. */
|
||||
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue