def test_statement(self):
    out = StringIO()
    mk = Makefile()
    mk.create_rule(['foo']).add_dependencies(['bar']).add_commands(['echo foo'])
    mk.add_statement('BAR = bar')
    mk.create_rule(['$(BAR)']).add_commands(['echo $@'])
    mk.dump(out, removal_guard=False)
    self.assertEqual(out.getvalue(), (((('foo: bar\n' + '\techo foo\n') + 'BAR = bar\n') + '$(BAR):\n') + '\techo $@\n'))
def test_statement(self):
    out = StringIO()
    mk = Makefile()
    mk.create_rule(['foo']).add_dependencies(['bar']).add_commands(['echo foo'])
    mk.add_statement('BAR = bar')
    mk.create_rule(['$(BAR)']).add_commands(['echo $@'])
    mk.dump(out, removal_guard=False)
    self.assertEqual(out.getvalue(), (((('foo: bar\n' + '\techo foo\n') + 'BAR = bar\n') + '$(BAR):\n') + '\techo $@\n'))