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

This commit is contained in:
David Majda 2012-04-20 18:56:18 +02:00
parent d3b3fe9b78
commit fb01f48c97
2 changed files with 7 additions and 7 deletions

View file

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

View file

@ -384,11 +384,4 @@ test("parses simpleDoubleQuotedCharacter", function() {
parserDoesNotParse('start = "\u2029"');
});
/* Canonical singleQuotedString is "'abcd'". */
test("parses singleQuotedString", function() {
parserParses("start = ''", literalGrammar(""));
parserParses("start = 'a'", literalGrammar("a"));
parserParses("start = 'abc'", literalGrammar("abc"));
});
})();