예제 #1
0
        public void TabThen4SpacesTest()
        {
            string text = "\tABC\n    DEF";

            Assert.IsTrue(MixedTabsDetector.HasMixedTabsAndSpaces(tabSize: 4, snapshot: new MockSnapshot(text)));
        }
예제 #2
0
        public void TabsNotAtLineStartTest()
        {
            string text = "A\tABC\n..DEF";

            Assert.IsFalse(MixedTabsDetector.HasMixedTabsAndSpaces(tabSize: 2, snapshot: new MockSnapshot(text)));
        }
예제 #3
0
        public void SpacesTabsMixedOnOneLineTest()
        {
            string text = "  \t  ABC\n\tDEF";

            Assert.IsTrue(MixedTabsDetector.HasMixedTabsAndSpaces(tabSize: 2, snapshot: new MockSnapshot(text)));
        }
예제 #4
0
        public void BadTabSizeTest()
        {
            string text = " ABC\n\tDEF";

            Assert.IsFalse(MixedTabsDetector.HasMixedTabsAndSpaces(tabSize: 0, snapshot: new MockSnapshot(text)));
        }
예제 #5
0
        public void NotEnoughSpacesTest()
        {
            string text = "...ABC\n\tDEF";

            Assert.IsFalse(MixedTabsDetector.HasMixedTabsAndSpaces(tabSize: 4, snapshot: new MockSnapshot(text)));
        }