Revert "ninja_syntax.py: Fix a bug when passing variables to Writer.build()"
authorEvan Martin <martine@danga.com>
Wed, 4 Jan 2012 22:33:53 +0000 (14:33 -0800)
committerEvan Martin <martine@danga.com>
Wed, 4 Jan 2012 22:33:53 +0000 (14:33 -0800)
This reverts commit 95ab954.
The test was verifying the wrong behavior.  I reviewed too quickly. :(

misc/ninja_syntax.py
misc/ninja_test.py

index 8f3e309f8d9e2543fed2daae1f1b1ad1b0f16139..b73a0024c6fa097504015379f8200960285857ef 100644 (file)
@@ -66,7 +66,7 @@ class Writer(object):
                                         ' '.join(all_inputs)))
 
         if variables:
-            for key, val in variables.iteritems():
+            for key, val in variables:
                 self.variable(key, val, indent=1)
 
         return outputs
index 7059ae76d8c264af4526a8f47a02eb46827a5f58..65dbec6ddf343cad6912b50f30c5e14318aa29b5 100755 (executable)
@@ -111,18 +111,5 @@ foo = a$$ $
 ''',
                          self.out.getvalue())
 
-class TestBuild(unittest.TestCase):
-    def setUp(self):
-        self.out = StringIO()
-        self.n = ninja_syntax.Writer(self.out)
-
-    def test_variables(self):
-        self.n.build('out', 'cc', 'in', variables={'name': 'value'})
-        self.assertEqual('''\
-build out: cc in
-  name = value
-''',
-                         self.out.getvalue())
-
 if __name__ == '__main__':
     unittest.main()