bpo-30603: Add test case to textwrap.dedent (GH-2014)
This commit is contained in:
parent
049cf2bb44
commit
601483d3b8
|
@ -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?"
|
||||
|
|
Loading…
Reference in New Issue