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

redux
David Majda 13 years ago
parent a46b9c197b
commit b4cffee9d4

@ -45,6 +45,14 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical eolChar is "\n". */
it("parses eolChar", function() {
expect('start =\n"abcd"' ).toParseAs(trivialGrammar);
expect('start =\r"abcd"' ).toParseAs(trivialGrammar);
expect('start =\u2028"abcd"').toParseAs(trivialGrammar);
expect('start =\u2029"abcd"').toParseAs(trivialGrammar);
});
/* Canonical whitespace is " ". */
it("parses whitespace", function() {
expect('start =\t"abcd"' ).toParseAs(trivialGrammar);

@ -572,12 +572,4 @@ test("parses eol", function() {
parserParses('start =\u2029"abcd"', simpleGrammar);
});
/* Canonical eolChar is "\n". */
test("parses eolChar", function() {
parserParses('start =\n"abcd"', simpleGrammar);
parserParses('start =\r"abcd"', simpleGrammar);
parserParses('start =\u2028"abcd"', simpleGrammar);
parserParses('start =\u2029"abcd"', simpleGrammar);
});
})();

Loading…
Cancel
Save