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 8f3e309..b73a002 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 7059ae7..65dbec6 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()