mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-30603: Add test case to textwrap.dedent (GH-2014)
This commit is contained in:
parent
049cf2bb44
commit
601483d3b8
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue