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

redux
David Majda 13 years ago
parent 0e384b31f4
commit fa65018b15

@ -115,6 +115,13 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical doubleQuotedString is "\"abcd\"". */
it("parses doubleQuotedString", function() {
expect('start = ""' ).toParseAs(literalGrammar(""));
expect('start = "a"' ).toParseAs(literalGrammar("a"));
expect('start = "abc"').toParseAs(literalGrammar("abc"));
});
/* Canonical doubleQuotedCharacter is "a". */
it("parses doubleQuotedCharacter", function() {
expect('start = "a"' ).toParseAs(literalGrammar("a"));

@ -355,11 +355,4 @@ test("parses string", function() {
parserParses('start "abcd"\n= "abcd"', namedRuleGrammar);
});
/* Canonical doubleQuotedString is "\"abcd\"". */
test("parses doubleQuotedString", function() {
parserParses('start = ""', literalGrammar(""));
parserParses('start = "a"', literalGrammar("a"));
parserParses('start = "abc"', literalGrammar("abc"));
});
})();

Loading…
Cancel
Save