public void Test_parse_argv_opt_with_arg() { Assert.AreEqual(new[] { new Option("-h", null, 0, new ValueObject(true)), new Option("-f", "--file", 1, "f.txt") }, Docopt.ParseArgv(TS("-h --file f.txt"), _options)); }
public void Test_parse_argv_short_and_long() { Assert.AreEqual(new[] { new Option("-h", null, 0, new ValueObject(true)), new Option("-v", "--verbose", 0, new ValueObject(true)) }, Docopt.ParseArgv(TS("-h --verbose"), _options)); }
public void Test_parse_argv_with_double_dash() { Assert.AreEqual( new Pattern[] { new Option("-h", null, 0, new ValueObject(true)), new Argument(null, "arg"), new Argument(null, "--"), new Argument(null, "-v") }, Docopt.ParseArgv(TS("-h arg -- -v"), _options)); }
public void Test_parse_argv_two_args() { Assert.AreEqual( new Pattern[] { new Option("-h", null, 0, new ValueObject(true)), new Option("-f", "--file", 1, "f.txt"), new Argument(null, "arg"), new Argument(null, "arg2") }, Docopt.ParseArgv(TS("-h --file f.txt arg arg2"), _options)); }
public void Test_parse_argv_one_opt() { Assert.AreEqual(new[] { new Option("-h", null, 0, new ValueObject(true)) }, Docopt.ParseArgv(TS("-h"), _options)); }
public void Test_parse_argv_empty() { Assert.IsEmpty(Docopt.ParseArgv(TS(""), _options)); }