[PATCH 8/9] StringList: Add test for get_indented() with tabs

"Jarret \"Jax\" Renker via Docutils-develop" <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID <LaQ0Rzg2aIoBYCmdq8hwB7mMtKNds1I-PKLkeWogqinxu6C0UJGuPvqNRjWXm4_RJqgp9dHz4oyvB1cD8eCmUyh9zzzIX40BRvzpJxYqMEo=@proton.me>
---
 docutils/test/test_viewlist.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/docutils/test/test_viewlist.py b/docutils/test/test_viewlist.py
index faa0bd098..fa8ff02e2 100755
--- a/docutils/test/test_viewlist.py
+++ b/docutils/test/test_viewlist.py
@@ -198,6 +198,11 @@ class StringList(unittest.TestCase):
       literal
            block"""
 
+    indented_string_with_tab = """\
+        Here is some
+\tindented text.
+"""
+
     def setUp(self):
         self.a_list = self.text.splitlines(True)
         self.a = statemachine.StringList(self.a_list, 'a')
@@ -214,6 +219,10 @@ def test_get_indented(self):
             statemachine.string2lines(self.indented_string))
         self.assertEqual(block.get_indented(),
                          ([s[6:] for s in block], 6, 1))
+        block = statemachine.StringList(
+            statemachine.string2lines(self.indented_string_with_tab))
+        self.assertEqual(block.get_indented(),
+                         ([s.expandtabs()[8:] for s in block], 8, 1))
 
 
 if __name__ == '__main__':
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.