summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_textwrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_textwrap.py')
-rw-r--r--Lib/test/test_textwrap.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py
index 47d97bd..fe15348 100644
--- a/Lib/test/test_textwrap.py
+++ b/Lib/test/test_textwrap.py
@@ -754,6 +754,11 @@ def foo():
expect = "Foo\n Bar\n\n Baz\n"
self.assertEqual(expect, dedent(text))
+ # Uneven indentation with declining indent level.
+ text = " Foo\n Bar\n" # 5 spaces, then 4
+ expect = " Foo\nBar\n"
+ self.assertEqual(expect, dedent(text))
+
# dedent() should not mangle internal tabs
def test_dedent_preserve_internal_tabs(self):
text = " hello\tthere\n how are\tyou?"