diff --git a/spec/parser.spec.js b/spec/parser.spec.js index fa1e024..80122d3 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -86,6 +86,14 @@ describe("PEG.js grammar parser", function() { }); }); + /* Canonical classCharacter is "a". */ + it("parses classCharacter", function() { + expect('start = [a]').toParseAs(classGrammar(["a"], "[a]")); + + /* This test demonstrates that |rawText| is not really "raw". */ + expect('start = [\u0080]').toParseAs(classGrammar(["\x80"], "[\\x80]")); + }); + /* Canonical bracketDelimitedCharacter is "a". */ it("parses bracketDelimitedCharacter", function() { expect('start = [a]' ).toParseAs(classGrammar(["a"], "[a]")); diff --git a/test/parser-test.js b/test/parser-test.js index 2c290df..9108618 100644 --- a/test/parser-test.js +++ b/test/parser-test.js @@ -442,9 +442,4 @@ test("parses classCharacterRange", function() { ); }); -/* Canonical classCharacter is "a". */ -test("parses classCharacter", function() { - parserParses("start = [a]", classGrammar(false, ["a"], "[a]")); -}); - })();