Esempio n. 1
0
        public void TabThen4SpacesTest()
        {
            string text = "\tABC\n    DEF";

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

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

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

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

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