diff options
Diffstat (limited to 'test/Fortran/F95COMSTR.py')
-rw-r--r-- | test/Fortran/F95COMSTR.py | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/test/Fortran/F95COMSTR.py b/test/Fortran/F95COMSTR.py index 5d162f9..e3bc3ac 100644 --- a/test/Fortran/F95COMSTR.py +++ b/test/Fortran/F95COMSTR.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'): f95pp = 'f95' @@ -49,17 +39,17 @@ else: test.write('SConstruct', """ -env = Environment(F95COM = r'%(_python_)s myfc.py f95 $TARGET $SOURCES', +env = Environment(F95COM = r'%(_python_)s mycompile.py f95 $TARGET $SOURCES', F95COMSTR = 'Building f95 $TARGET from $SOURCES', - F95PPCOM = r'%(_python_)s myfc.py f95pp $TARGET $SOURCES', + F95PPCOM = r'%(_python_)s mycompile.py f95pp $TARGET $SOURCES', F95PPCOMSTR = 'Building f95pp $TARGET from $SOURCES', OBJSUFFIX='.obj') env.Object(source = 'test01.f95') env.Object(source = 'test02.F95') """ % locals()) -test.write('test01.f95', "A .f95 file.\n#f95\n") -test.write('test02.F95', "A .F95 file.\n#%s\n" % f95pp) +test.write('test01.f95', "A .f95 file.\n/*f95*/\n") +test.write('test02.F95', "A .F95 file.\n/*%s*/\n" % f95pp) test.run(stdout = test.wrap_stdout("""\ Building f95 test01.obj from test01.f95 |