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

redux
David Majda 13 years ago
parent da4ac8bb92
commit b9ae8f9561

@ -86,6 +86,16 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical bracketDelimitedCharacter is "a". */
it("parses bracketDelimitedCharacter", function() {
expect('start = [a]' ).toParseAs(classGrammar(["a"], "[a]"));
expect('start = [\\n]' ).toParseAs(classGrammar(["\n"], "[\\n]"));
expect('start = [\\0]' ).toParseAs(classGrammar(["\x00"], "[\\0]"));
expect('start = [\\xFF]' ).toParseAs(classGrammar(["\xFF"], "[\\xFF]"));
expect('start = [\\uFFFF]').toParseAs(classGrammar(["\uFFFF"], "[\\uFFFF]"));
expect('start = [\\\n]' ).toParseAs(classGrammar(["\n"], "[\\n]"));
});
/* Canonical simpleBracketDelimiedCharacter is "a". */
it("parses simpleBracketDelimitedCharacter", function() {
expect('start = [a]').toParseAs(classGrammar(["a"], "[a]"));

@ -447,14 +447,4 @@ test("parses classCharacter", function() {
parserParses("start = [a]", classGrammar(false, ["a"], "[a]"));
});
/* Canonical bracketDelimitedCharacter is "a". */
test("parses bracketDelimitedCharacter", function() {
parserParses("start = [a]", classGrammar(false, ["a"], "[a]"));
parserParses("start = [\\n]", classGrammar(false, ["\n"], "[\\n]"));
parserParses("start = [\\0]", classGrammar(false, ["\x00"], "[\\0]"));
parserParses("start = [\\x00]", classGrammar(false, ["\x00"], "[\\0]"));
parserParses("start = [\\u0120]", classGrammar(false, ["\u0120"], "[\\u0120]"));
parserParses("start = [\\\n]", classGrammar(false, ["\n"], "[\\n]"));
});
})();

Loading…
Cancel
Save