Example #1
0
        public void TestIndexOfIgnoreCase()
        {
            WildcardMatcher.IndexOfIgnoreCase("foo", "foo", "foo", false, 0, 6).Should().Be(0);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "foo", false, 0, 6).Should().Be(0);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "oob", false, 0, 6).Should().Be(1);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "oba", false, 0, 6).Should().Be(2);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "bar", false, 0, 6).Should().Be(3);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "o", false, 0, 6).Should().Be(1);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "ob", false, 0, 6).Should().Be(2);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "ooba", false, 0, 6).Should().Be(1);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "oobar", false, 0, 6).Should().Be(1);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "fooba", false, 0, 6).Should().Be(0);
            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "foobar", false, 0, 6).Should().Be(0);
            WildcardMatcher.IndexOfIgnoreCase("afoo", "bar", "oba", false, 0, 7).Should().Be(3);
            WildcardMatcher.IndexOfIgnoreCase("afoo", "bara", "oba", false, 0, 8).Should().Be(3);
            WildcardMatcher.IndexOfIgnoreCase("aafoo", "baraa", "oba", false, 0, 10).Should().Be(4);

            WildcardMatcher.IndexOfIgnoreCase("foo", "bar", "ara", false, 0, 6).Should().Be(-1);
        }