diff options
Diffstat (limited to 'test/LEX')
-rw-r--r-- | test/LEX/LEX.py | 10 | ||||
-rw-r--r-- | test/LEX/LEXCOM.py | 6 | ||||
-rw-r--r-- | test/LEX/LEXCOMSTR.py | 6 | ||||
-rw-r--r-- | test/LEX/LEXFLAGS.py | 8 |
4 files changed, 16 insertions, 14 deletions
diff --git a/test/LEX/LEX.py b/test/LEX/LEX.py index 5515a3e..3fd4db3 100644 --- a/test/LEX/LEX.py +++ b/test/LEX/LEX.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ _exe = TestSCons._exe test = TestSCons.TestSCons() @@ -49,10 +49,10 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(LEX = r'%s mylex.py', tools=['default', 'lex']) +env = Environment(LEX = r'%(_python_)s mylex.py', tools=['default', 'lex']) env.Program(target = 'aaa', source = 'aaa.l') env.Program(target = 'bbb', source = 'bbb.lex') -""" % python) +""" % locals()) test.write('aaa.l', r""" int @@ -97,10 +97,10 @@ os.system(string.join(sys.argv[1:], " ")) test.write('SConstruct', """ foo = Environment() lex = foo.Dictionary('LEX') -bar = Environment(LEX = r'%s wrapper.py ' + lex) +bar = Environment(LEX = r'%(_python_)s wrapper.py ' + lex) foo.Program(target = 'foo', source = 'foo.l') bar.Program(target = 'bar', source = 'bar.l') -""" % python) +""" % locals()) lex = r""" %%%% diff --git a/test/LEX/LEXCOM.py b/test/LEX/LEXCOM.py index ea4626d..7ce8a15 100644 --- a/test/LEX/LEXCOM.py +++ b/test/LEX/LEXCOM.py @@ -30,7 +30,7 @@ Test the ability to configure the $LEXCOM construction variable. import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -48,10 +48,10 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'lex'], - LEXCOM = r'%s mylex.py $TARGET $SOURCES') + LEXCOM = r'%(_python_)s mylex.py $TARGET $SOURCES') env.CFile(target = 'aaa', source = 'aaa.l') env.CFile(target = 'bbb', source = 'bbb.lex') -""" % python) +""" % locals()) test.write('aaa.l', "aaa.l\n/*lex*/\n") test.write('bbb.lex', "bbb.lex\n/*lex*/\n") diff --git a/test/LEX/LEXCOMSTR.py b/test/LEX/LEXCOMSTR.py index 5b01df7..a06c20c 100644 --- a/test/LEX/LEXCOMSTR.py +++ b/test/LEX/LEXCOMSTR.py @@ -31,7 +31,7 @@ the displayed string when lex is called. import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -49,11 +49,11 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'lex'], - LEXCOM = r'%s mylex.py $TARGET $SOURCES', + LEXCOM = r'%(_python_)s mylex.py $TARGET $SOURCES', LEXCOMSTR = 'Lexing $TARGET from $SOURCE') env.CFile(target = 'aaa', source = 'aaa.l') env.CFile(target = 'bbb', source = 'bbb.lex') -""" % python) +""" % locals()) test.write('aaa.l', "aaa.l\n/*lex*/\n") test.write('bbb.lex', "bbb.lex\n/*lex*/\n") diff --git a/test/LEX/LEXFLAGS.py b/test/LEX/LEXFLAGS.py index 87a869f..5923934 100644 --- a/test/LEX/LEXFLAGS.py +++ b/test/LEX/LEXFLAGS.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ _exe = TestSCons._exe test = TestSCons.TestSCons() @@ -52,9 +52,11 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(LEX = r'%s mylex.py', LEXFLAGS = '-x', tools=['default', 'lex']) +env = Environment(LEX = r'%(_python_)s mylex.py', + LEXFLAGS = '-x', + tools=['default', 'lex']) env.Program(target = 'aaa', source = 'aaa.l') -""" % python) +""" % locals()) test.write('aaa.l', r""" int |