public void TestVal2() { var p = new CmdArgs.CmdArgsParser <Conf>(); Assert.Throws <CmdException>(() => p.ParseCommandLine(new[] { "-s", "--dummy", "val" })); }
public void TestIgnoreCase() { var p = new CmdArgs.CmdArgsParser <Conf>(); Res <Conf> rv = p.ParseCommandLine(new[] { "--DUMMY" }); Check(rv, s: false, d: true); }
public void TestLongname() { var p = new CmdArgs.CmdArgsParser <Conf>(); Res <Conf> rv = p.ParseCommandLine(new[] { "--dummy" }); Check(rv, s: false, d: true); }
public void TestTwoInOne1() { var p = new CmdArgs.CmdArgsParser <Conf>(); Res <Conf> rv = p.ParseCommandLine(new[] { "-ds" }); Check(rv, s: true, d: true); }
public void TestShortnameCase() { var p = new CmdArgs.CmdArgsParser <Conf> { AllowUnknownArguments = false }; Assert.Throws <CmdException>(() => p.ParseCommandLine(new[] { "-S" })); }
public void TestShortname2() { var p = new CmdArgs.CmdArgsParser <Conf> { AllowUnknownArguments = true }; Res <Conf> rv = p.ParseCommandLine(new[] { "-d" }); Check(rv, s: false, d: true); }