示例#1
0
        public void CanImplicitlyCloseUnmatchedOpeningBrackets()
        {
            var actual   = Variants.Expand("[f[o[o").ToList();
            var expected = new[] { "f", "fo", "foo" };

            Assert.Equal(expected, actual);
        }
示例#2
0
        public void CanIgnoreUnmatchedClosingBrackets()
        {
            var actual   = Variants.Expand("f]o|o]").ToList();
            var expected = new[] { "fo", "o" };

            Assert.Equal(expected, actual);
        }
示例#3
0
        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);
        }
示例#4
0
 public void CanNullAndEmpty()
 {
     Assert.Empty(Variants.Expand(null));
     Assert.Empty(Variants.Expand(string.Empty));
 }
示例#5
0
        public void CanEmptyBrackets(string input, params string[] expected)
        {
            var actual = Variants.Expand(input).ToList();

            Assert.Equal(expected, actual);
        }