diff --git a/spec/parser.spec.js b/spec/parser.spec.js index 44703f6..1b0ff9e 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -68,6 +68,12 @@ describe("PEG.js grammar parser", function() { }); }); + // Canonical comment is "/* comment */". + it("parses comment", function() { + expect('start =// comment\n"abcd"' ).toParseAs(trivialGrammar); + expect('start =/* comment */"abcd"').toParseAs(trivialGrammar); + }); + /* Canonical singleLineComment is "// comment". */ it("parses singleLineComment", function() { expect('start =//\n"abcd"' ).toParseAs(trivialGrammar); diff --git a/test/parser-test.js b/test/parser-test.js index fd25e10..8664669 100644 --- a/test/parser-test.js +++ b/test/parser-test.js @@ -536,10 +536,4 @@ test("parses __", function() { /* Trivial character class rules are not tested. */ -// Canonical comment is "\/* comment *\/". -test("parses comment", function() { - parserParses('start =// comment\n"abcd"', simpleGrammar); - parserParses('start =/* comment */"abcd"', simpleGrammar); -}); - })();