summaryrefslogtreecommitdiffstats
path: root/misc/ninja_syntax_test.py
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-04-27 19:17:10 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-04-27 19:17:10 (GMT)
commita60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d (patch)
tree096eff77f63235157d529d749cc6d67199856f1d /misc/ninja_syntax_test.py
parent484c16336f19bd8970bb6e75322d61b92a229899 (diff)
parent06b0e568f62d228837e96c485447f55da1ae9b5d (diff)
downloadNinja-1.7.0.zip
Ninja-1.7.0.tar.gz
Ninja-1.7.0.tar.bz2
v1.7.0v1.7.0
Diffstat (limited to 'misc/ninja_syntax_test.py')
-rwxr-xr-xmisc/ninja_syntax_test.py13
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'}