public void CanImplicitlyCloseUnmatchedOpeningBrackets() { var actual = Variants.Expand("[f[o[o").ToList(); var expected = new[] { "f", "fo", "foo" }; Assert.Equal(expected, actual); }
public void CanIgnoreUnmatchedClosingBrackets() { var actual = Variants.Expand("f]o|o]").ToList(); var expected = new[] { "fo", "o" }; Assert.Equal(expected, actual); }
public void CanOmitEmptyVariants(string input, params string[] expected) { var actual = Variants.Expand(input).ToList(); _output.WriteLine("{0} => {1}", input, string.Join(", ", actual)); Assert.Equal(expected, actual); }
public void CanNullAndEmpty() { Assert.Empty(Variants.Expand(null)); Assert.Empty(Variants.Expand(string.Empty)); }
public void CanEmptyBrackets(string input, params string[] expected) { var actual = Variants.Expand(input).ToList(); Assert.Equal(expected, actual); }