diff options
Diffstat (limited to 'misc/ninja_syntax_test.py')
-rwxr-xr-x | misc/ninja_syntax_test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/ninja_syntax_test.py b/misc/ninja_syntax_test.py index 36b2e7b..07e3ed3 100755 --- a/misc/ninja_syntax_test.py +++ b/misc/ninja_syntax_test.py @@ -45,6 +45,12 @@ class TestLineWordWrap(unittest.TestCase): INDENT + 'y']) + '\n', self.out.getvalue()) + def test_comment_wrap(self): + # Filenames shoud not be wrapped + self.n.comment('Hello /usr/local/build-tools/bin') + 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 @@ -148,6 +154,13 @@ build out: cc in ''', self.out.getvalue()) + def test_implicit_outputs(self): + self.n.build('o', 'cc', 'i', implicit_outputs='io') + self.assertEqual('''\ +build o | io: cc i +''', + self.out.getvalue()) + class TestExpand(unittest.TestCase): def test_basic(self): vars = {'x': 'X'} |