示例#1
0
        public void BlankLine()
        {
            string text     = "  Four score and\n   \nseven years\n\n    ago";
            string expected = "Four score and\n \nseven years\n \n  ago\n";
            string actual   = Reformat.Code(text);

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void ReplaceTabs()
        {
            string text     = "Four score and\tseven years\tago";
            string expected = "Four score and    seven years    ago\n";
            string actual   = Reformat.Code(text);

            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void DontRemovePadding()
        {
            string text     = "  Four score and\n   seven years\n ago";
            string expected = "Four score and\n seven years\n ago\n";
            string actual   = Reformat.Code(text);

            Assert.AreEqual(expected, actual);

            text     = "Four score and\n   seven years\n\tago our";
            expected = "Four score and\n   seven years\n    ago our\n";
            actual   = Reformat.Code(text);
            Assert.AreEqual(expected, actual);
        }