public void CaseInsensitivelyMatchesRegEx() { var args = new CaseInsensitiveRegExStringArguments(); CommandLineParser.Parse(new string[] { }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=" }, args).Should().BeFalse(); CommandLineParser.Parse(new[] { "/value=hallo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=halloo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=hallooo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=HALLO" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=HALLOoOo" }, args).Should().BeTrue(); }
public void CaseInsensitivelyMatchesRegEx() { var args = new CaseInsensitiveRegExStringArguments(); TryParse(Array.Empty <string>(), args).Should().BeTrue(); TryParse(new[] { "/value=" }, args).Should().BeFalse(); TryParse(new[] { "/value=hallo" }, args).Should().BeTrue(); TryParse(new[] { "/value=halloo" }, args).Should().BeTrue(); TryParse(new[] { "/value=hallooo" }, args).Should().BeTrue(); TryParse(new[] { "/value=HALLO" }, args).Should().BeTrue(); TryParse(new[] { "/value=HALLOoOo" }, args).Should().BeTrue(); }