Skip to content

Commit c0333af

Browse files
committed
Failing test for IsPositional(N)
1 parent 2919ce0 commit c0333af

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Tests/CommandLineTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public static void TestPostBuild()
148148
CommandLineParser.PostBuildStep<Test1Cmd>(reporter);
149149
CommandLineParser.PostBuildStep<Test2Cmd>(reporter);
150150
CommandLineParser.PostBuildStep<Test3Cmd>(reporter);
151+
CommandLineParser.PostBuildStep<Test5Cmd3>(reporter);
151152
}
152153

153154
[Fact]

Tests/Test5.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,26 @@ class Test5Cmd2
1515
[IsPositional(1), IsMandatory] public int One;
1616
[IsPositional(0)] public int Two;
1717
}
18+
19+
class Test5Cmd3
20+
{
21+
[IsPositional, IsMandatory] public Test5Cmd3_CmdBase Cmd;
22+
}
23+
24+
[CommandGroup]
25+
abstract class Test5Cmd3_CmdBase
26+
{
27+
[IsPositional(1), IsMandatory] public string One;
28+
[IsPositional(1), IsMandatory] public Test5Cmd3_SubCmdBase Sub;
29+
}
30+
31+
[CommandName("cmd")]
32+
class Test5Cmd3_Cmd : Test5Cmd3_CmdBase
33+
{
34+
[IsPositional(0), IsMandatory] public string Two;
35+
}
36+
37+
[CommandGroup]
38+
abstract class Test5Cmd3_SubCmdBase { }
39+
[CommandName("sub")]
40+
class Test5Cmd3_SubCmd : Test5Cmd3_SubCmdBase { }

0 commit comments

Comments
 (0)