[Test] public void PositionalsGroupsTestInterleavedGroups() { var parser = new Parser(); var group1 = parser.AddArgumentGroup("xxx"); parser.AddArgument("foo"); group1.AddArgument("bar"); parser.AddArgument("baz"); var group2 = parser.AddArgumentGroup("yyy"); group2.AddArgument("freil"); Asserter.AreEqual(new ParseResult {{"foo", "1"}, {"bar", "2"}, {"baz", "3"}, {"freil", "4"}}, parser.ParseArguments("1 2 3 4".Split(new char[] {}))); }
[Test] public void PositionalsGroupsTestGroupFirst() { var parser = new Parser(); var group = parser.AddArgumentGroup("xxx"); group.AddArgument("foo"); parser.AddArgument("bar"); parser.AddArgument("baz"); Asserter.AreEqual(new ParseResult {{"foo", "1"}, {"bar", "2"}, {"baz", "3"}}, parser.ParseArguments("1 2 3".Split(new char[] {}))); }