diff --git a/spec/generated-parser.spec.js b/spec/generated-parser.spec.js index be6ecd4..fd1b536 100644 --- a/spec/generated-parser.spec.js +++ b/spec/generated-parser.spec.js @@ -91,6 +91,18 @@ describe("generated parser", function() { }); }); + describe("one or more matching", function() { + varyAll(function(options) { + it("matches correctly", function() { + var parser = PEG.buildParser('start = "a"+', options); + + expect(parser).toFailToParse(""); + expect(parser).toParse("a", ["a"]); + expect(parser).toParse("aaa", ["a", "a", "a"]); + }); + }); + }); + describe("action code", function() { varyAll(function(options) { it("tranforms the expression result by returnung a non-|null| value", function() { diff --git a/test/compiler-test.js b/test/compiler-test.js index d0ee3aa..bf874ab 100644 --- a/test/compiler-test.js +++ b/test/compiler-test.js @@ -442,13 +442,6 @@ testWithVaryingTrackLineAndColumn("zero or more expressions", function(options) parses(parser, "aaa", ["a", "a", "a"]); }); -testWithVaryingTrackLineAndColumn("one or more expressions", function(options) { - var parser = PEG.buildParser('start = "a"+', options); - doesNotParse(parser, ""); - parses(parser, "a", ["a"]); - parses(parser, "aaa", ["a", "a", "a"]); -}); - testWithVaryingTrackLineAndColumn("initializer", function(options) { var variableInActionParser = PEG.buildParser( '{ a = 42; }; start = "a" { return a; }',