diff options
Diffstat (limited to 'misc/ninja_syntax_test.py')
-rwxr-xr-x | misc/ninja_syntax_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/ninja_syntax_test.py b/misc/ninja_syntax_test.py index 36b2e7b..46ce382 100755 --- a/misc/ninja_syntax_test.py +++ b/misc/ninja_syntax_test.py @@ -45,6 +45,17 @@ class TestLineWordWrap(unittest.TestCase): INDENT + 'y']) + '\n', self.out.getvalue()) + def test_comment_wrap(self): + # We should wrap the comments + self.n.comment('Hello there') + self.assertEqual('# Hello\n# there\n', self.out.getvalue()) + + def test_comment_wrap_filename(self): + # Filenames shoud not be wrapped + self.n.comment('Hello /usr/local/build-tools/bin', has_path=True) + self.assertEqual('# Hello\n# /usr/local/build-tools/bin\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 |