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

This commit is contained in:
David Majda 2012-04-20 19:02:40 +02:00
parent 0e384b31f4
commit fa65018b15
2 changed files with 7 additions and 7 deletions

View file

@ -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"));

View file

@ -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"));
});
})();