Add a regression test for a case that failed before the globals fix.

This commit is contained in:
Sei Lisa 2014-07-28 01:01:10 +02:00
parent 8907a59d5f
commit ae94e80c34

View file

@ -266,6 +266,15 @@ class Test03_Optimizer(UnitTestCase):
self.opt.optimize(p, self.parser.functions)
print self.outscript.output(p)
def test_regression(self):
p = self.parser.parse('''
integer a;
x() { if (1) { string s = "x"; s = s + (string)a; } }
default { timer() { } }
''', ['extendedassignment'])
self.opt.optimize(p, self.parser.functions)
self.outscript.output(p)
def tearDown(self):
del self.parser
del self.opt