summaryrefslogtreecommitdiffstats
path: root/misc/ninja_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ninja_test.py')
-rwxr-xr-xmisc/ninja_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/misc/ninja_test.py b/misc/ninja_test.py
index 897de72..b56033e 100755
--- a/misc/ninja_test.py
+++ b/misc/ninja_test.py
@@ -41,6 +41,18 @@ class TestLineWordWrap(unittest.TestCase):
INDENT + 'y']) + '\n',
self.out.getvalue())
+ def test_short_words_indented(self):
+ # Test that indent is taking into acount when breaking subsequent lines.
+ # The second line should not be ' to tree', as that's longer than the
+ # test layout width of 8.
+ self.n._line('line_one to tree')
+ self.assertEqual('''\
+line_one $
+ to $
+ tree
+''',
+ self.out.getvalue())
+
def test_few_long_words_indented(self):
# Check wrapping in the presence of indenting.
self.n._line(' '.join(['x', LONGWORD, 'y']), indent=1)