summaryrefslogtreecommitdiffstats
path: root/test/Fortran/F03COMSTR.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
commit5587089a661a520a32c353ea886939cd63a0636a (patch)
tree22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/Fortran/F03COMSTR.py
parent6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff)
downloadSCons-5587089a661a520a32c353ea886939cd63a0636a.zip
SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.gz
SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.bz2
Moved common my<xxx>.py functions to global fixture and resolve byte/str.
Diffstat (limited to 'test/Fortran/F03COMSTR.py')
-rw-r--r--test/Fortran/F03COMSTR.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/test/Fortran/F03COMSTR.py b/test/Fortran/F03COMSTR.py
index 327c1cd..a3f4e38 100644
--- a/test/Fortran/F03COMSTR.py
+++ b/test/Fortran/F03COMSTR.py
@@ -30,17 +30,7 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('myfc.py', r"""
-import sys
-fline = '#'+sys.argv[1]+'\n'
-outfile = open(sys.argv[2], 'wb')
-infile = open(sys.argv[3], 'rb')
-for l in [l for l in infile.readlines() if l != fline]:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
if not TestSCons.case_sensitive_suffixes('.f','.F'):
f03pp = 'f03'
@@ -49,17 +39,17 @@ else:
test.write('SConstruct', """
-env = Environment(F03COM = r'%(_python_)s myfc.py f03 $TARGET $SOURCES',
+env = Environment(F03COM = r'%(_python_)s mycompile.py f03 $TARGET $SOURCES',
F03COMSTR = 'Building f03 $TARGET from $SOURCES',
- F03PPCOM = r'%(_python_)s myfc.py f03pp $TARGET $SOURCES',
+ F03PPCOM = r'%(_python_)s mycompile.py f03pp $TARGET $SOURCES',
F03PPCOMSTR = 'Building f03pp $TARGET from $SOURCES',
OBJSUFFIX='.obj')
env.Object(source = 'test01.f03')
env.Object(source = 'test02.F03')
""" % locals())
-test.write('test01.f03', "A .f03 file.\n#f03\n")
-test.write('test02.F03', "A .F03 file.\n#%s\n" % f03pp)
+test.write('test01.f03', "A .f03 file.\n/*f03*/\n")
+test.write('test02.F03', "A .F03 file.\n/*%s*/\n" % f03pp)
test.run(stdout = test.wrap_stdout("""\
Building f03 test01.obj from test01.f03