diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-11-28 16:55:20 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-11-28 16:55:20 (GMT) |
commit | a36be0b33a054ae22e61851134090c65fa74e0b1 (patch) | |
tree | ed6fe9edbfe843fb968ab9e7e8ea395da1682795 | |
parent | e107f8277992751680db0eb7b70e38ea260790fc (diff) | |
parent | 694e80ea463c655d2e011afd4fe35109c119d6e7 (diff) | |
download | SCons-a36be0b33a054ae22e61851134090c65fa74e0b1.zip SCons-a36be0b33a054ae22e61851134090c65fa74e0b1.tar.gz SCons-a36be0b33a054ae22e61851134090c65fa74e0b1.tar.bz2 |
merge heads
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/ar.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/mingw.py | 3 | ||||
-rw-r--r-- | test/AR/ARCOM.py | 2 | ||||
-rw-r--r-- | test/AR/ARCOMSTR.py | 1 | ||||
-rw-r--r-- | test/Fortran/F03COM.py | 18 | ||||
-rw-r--r-- | test/Fortran/F08COM.py | 16 | ||||
-rw-r--r-- | test/Fortran/F77COM.py | 17 | ||||
-rw-r--r-- | test/Fortran/F90COM.py | 20 | ||||
-rw-r--r-- | test/Fortran/F95COM.py | 18 | ||||
-rw-r--r-- | test/Fortran/FORTRANCOM.py | 15 | ||||
-rw-r--r-- | test/Fortran/SHF77COM.py | 16 | ||||
-rw-r--r-- | test/Fortran/SHF90COM.py | 19 | ||||
-rw-r--r-- | test/Fortran/SHF95COM.py | 18 | ||||
-rw-r--r-- | test/Fortran/SHFORTRANCOM.py | 14 | ||||
-rw-r--r-- | test/M4/M4.py | 8 |
16 files changed, 134 insertions, 57 deletions
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index cc5a508..0e5f364 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -263,7 +263,7 @@ def createStaticLibBuilder(env): static_lib = env['BUILDERS']['StaticLibrary'] except KeyError: action_list = [ SCons.Action.Action("$ARCOM", "$ARCOMSTR") ] - if env.Detect('ranlib'): + if env.get('RANLIB',False) or env.Detect('ranlib'): ranlib_action = SCons.Action.Action("$RANLIBCOM", "$RANLIBCOMSTR") action_list.append(ranlib_action) diff --git a/src/engine/SCons/Tool/ar.py b/src/engine/SCons/Tool/ar.py index 0c3ac09..2cd15c8 100644 --- a/src/engine/SCons/Tool/ar.py +++ b/src/engine/SCons/Tool/ar.py @@ -48,8 +48,8 @@ def generate(env): env['LIBPREFIX'] = 'lib' env['LIBSUFFIX'] = '.a' - if env.Detect('ranlib'): - env['RANLIB'] = 'ranlib' + if env.get('RANLIB',env.Detect('ranlib')) : + env['RANLIB'] = env.get('RANLIB','ranlib') env['RANLIBFLAGS'] = SCons.Util.CLVar('') env['RANLIBCOM'] = '$RANLIB $RANLIBFLAGS $TARGET' diff --git a/src/engine/SCons/Tool/mingw.py b/src/engine/SCons/Tool/mingw.py index 948ebe5..778db3c 100644 --- a/src/engine/SCons/Tool/mingw.py +++ b/src/engine/SCons/Tool/mingw.py @@ -86,7 +86,8 @@ def shlib_emitter(target, source, env): no_import_lib = env.get('no_import_lib', 0) if not dll: - raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")) + raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s Target(s) are:%s" % \ + (env.subst("$SHLIBSUFFIX"), ",".join([str(t) for t in target]))) if not no_import_lib and \ not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'): diff --git a/test/AR/ARCOM.py b/test/AR/ARCOM.py index f9d0038..9ae5b9f 100644 --- a/test/AR/ARCOM.py +++ b/test/AR/ARCOM.py @@ -40,6 +40,7 @@ test.file_fixture('myrewrite.py') test.write('SConstruct', """ env = Environment(tools=['default', 'ar'], ARCOM = r'%(_python_)s mycompile.py ar $TARGET $SOURCES', + RANLIB = True, RANLIBCOM = r'%(_python_)s myrewrite.py ranlib $TARGET', LIBPREFIX = '', LIBSUFFIX = '.lib') @@ -49,6 +50,7 @@ env.Library(target = 'output', source = ['file.1', 'file.2']) test.write('file.1', "file.1\n/*ar*/\n/*ranlib*/\n") test.write('file.2', "file.2\n/*ar*/\n/*ranlib*/\n") + test.run(arguments = '.') test.must_match('output.lib', "file.1\nfile.2\n") diff --git a/test/AR/ARCOMSTR.py b/test/AR/ARCOMSTR.py index 3235f12..a3a9c8e 100644 --- a/test/AR/ARCOMSTR.py +++ b/test/AR/ARCOMSTR.py @@ -42,6 +42,7 @@ test.write('SConstruct', """ env = Environment(tools=['default', 'ar'], ARCOM = r'%(_python_)s mycompile.py ar $TARGET $SOURCES', ARCOMSTR = 'Archiving $TARGET from $SOURCES', + RANLIB = True, RANLIBCOM = r'%(_python_)s myrewrite.py ranlib $TARGET', LIBPREFIX = '', LIBSUFFIX = '.lib') diff --git a/test/Fortran/F03COM.py b/test/Fortran/F03COM.py index 4a42d22..aaa790c 100644 --- a/test/Fortran/F03COM.py +++ b/test/Fortran/F03COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = (sys.platform == 'win32') _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -76,18 +79,23 @@ test.write('test22.F03', "This is a .F03 file.\n#link\n/*f03pp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") test.must_match('test08' + _exe, "This is a .FPP file.\n") test.must_match('test13' + _exe, "This is a .f03 file.\n") -test.must_match('test14' + _exe, "This is a .F03 file.\n") test.must_match('test21' + _exe, "This is a .f03 file.\n") -test.must_match('test22' + _exe, "This is a .F03 file.\n") + +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test14' + _exe, "This is a .F03 file.\n") + test.must_match('test22' + _exe, "This is a .F03 file.\n") + test.pass_test() diff --git a/test/Fortran/F08COM.py b/test/Fortran/F08COM.py index ba7d64e..f159a53 100644 --- a/test/Fortran/F08COM.py +++ b/test/Fortran/F08COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -67,15 +70,18 @@ test.write('test10.F08', "This is a .F08 file.\n#link\n/*f08pp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") -test.must_match('test08' + _exe, "This is a .FPP file.\n") test.must_match('test09' + _exe, "This is a .f08 file.\n") -test.must_match('test10' + _exe, "This is a .F08 file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test08' + _exe, "This is a .FPP file.\n") + test.must_match('test10' + _exe, "This is a .F08 file.\n") test.pass_test() diff --git a/test/Fortran/F77COM.py b/test/Fortran/F77COM.py index e7a3cca..6550d92 100644 --- a/test/Fortran/F77COM.py +++ b/test/Fortran/F77COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -67,15 +70,19 @@ test.write('test10.F77', "This is a .F77 file.\n#link\n/*f77pp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") -test.must_match('test08' + _exe, "This is a .FPP file.\n") test.must_match('test09' + _exe, "This is a .f77 file.\n") -test.must_match('test10' + _exe, "This is a .F77 file.\n") + +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test08' + _exe, "This is a .FPP file.\n") + test.must_match('test10' + _exe, "This is a .F77 file.\n") test.pass_test() diff --git a/test/Fortran/F90COM.py b/test/Fortran/F90COM.py index a4f37c2..180e6b7 100644 --- a/test/Fortran/F90COM.py +++ b/test/Fortran/F90COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -76,18 +79,23 @@ test.write('test22.F90', "This is a .F90 file.\n#link\n/*f90pp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") -test.must_match('test08' + _exe, "This is a .FPP file.\n") test.must_match('test11' + _exe, "This is a .f90 file.\n") -test.must_match('test12' + _exe, "This is a .F90 file.\n") test.must_match('test21' + _exe, "This is a .f90 file.\n") -test.must_match('test22' + _exe, "This is a .F90 file.\n") + +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test08' + _exe, "This is a .FPP file.\n") + test.must_match('test12' + _exe, "This is a .F90 file.\n") + test.must_match('test22' + _exe, "This is a .F90 file.\n") + test.pass_test() diff --git a/test/Fortran/F95COM.py b/test/Fortran/F95COM.py index 32ae594..2d48770 100644 --- a/test/Fortran/F95COM.py +++ b/test/Fortran/F95COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -76,18 +79,21 @@ test.write('test22.F95', "This is a .F95 file.\n#link\n/*f95pp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") -test.must_match('test08' + _exe, "This is a .FPP file.\n") test.must_match('test13' + _exe, "This is a .f95 file.\n") -test.must_match('test14' + _exe, "This is a .F95 file.\n") test.must_match('test21' + _exe, "This is a .f95 file.\n") -test.must_match('test22' + _exe, "This is a .F95 file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test08' + _exe, "This is a .FPP file.\n") + test.must_match('test14' + _exe, "This is a .F95 file.\n") + test.must_match('test22' + _exe, "This is a .F95 file.\n") test.pass_test() diff --git a/test/Fortran/FORTRANCOM.py b/test/Fortran/FORTRANCOM.py index a07d427..d3d7e7f 100644 --- a/test/Fortran/FORTRANCOM.py +++ b/test/Fortran/FORTRANCOM.py @@ -25,6 +25,10 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') + _python_ = TestSCons._python_ _exe = TestSCons._exe @@ -61,13 +65,16 @@ test.write('test08.FPP', "This is a .FPP file.\n#link\n/*fortranpp*/\n") test.run(arguments = '.', stderr = None) test.must_match('test01' + _exe, "This is a .f file.\n") -test.must_match('test02' + _exe, "This is a .F file.\n") test.must_match('test03' + _exe, "This is a .for file.\n") -test.must_match('test04' + _exe, "This is a .FOR file.\n") test.must_match('test05' + _exe, "This is a .ftn file.\n") -test.must_match('test06' + _exe, "This is a .FTN file.\n") test.must_match('test07' + _exe, "This is a .fpp file.\n") -test.must_match('test08' + _exe, "This is a .FPP file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match('test02' + _exe, "This is a .F file.\n") + test.must_match('test04' + _exe, "This is a .FOR file.\n") + test.must_match('test06' + _exe, "This is a .FTN file.\n") + test.must_match('test08' + _exe, "This is a .FPP file.\n") test.pass_test() diff --git a/test/Fortran/SHF77COM.py b/test/Fortran/SHF77COM.py index 9289fa3..bd3d1e2 100644 --- a/test/Fortran/SHF77COM.py +++ b/test/Fortran/SHF77COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _obj = TestSCons._shobj @@ -65,15 +68,18 @@ test.write('test10.F77', "This is a .F77 file.\n/*f77pp*/\n") test.run(arguments = '.', stderr = None) test.must_match(obj_ + 'test01' + _obj, "This is a .f file.\n") -test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") test.must_match(obj_ + 'test03' + _obj, "This is a .for file.\n") -test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") test.must_match(obj_ + 'test05' + _obj, "This is a .ftn file.\n") -test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") test.must_match(obj_ + 'test07' + _obj, "This is a .fpp file.\n") -test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") test.must_match(obj_ + 'test09' + _obj, "This is a .f77 file.\n") -test.must_match(obj_ + 'test10' + _obj, "This is a .F77 file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") + test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") + test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") + test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") + test.must_match(obj_ + 'test10' + _obj, "This is a .F77 file.\n") test.pass_test() diff --git a/test/Fortran/SHF90COM.py b/test/Fortran/SHF90COM.py index 9eef8b6..f66c347 100644 --- a/test/Fortran/SHF90COM.py +++ b/test/Fortran/SHF90COM.py @@ -25,6 +25,10 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') + _python_ = TestSCons._python_ _obj = TestSCons._shobj @@ -72,18 +76,21 @@ test.write('test22.F90', "This is a .F90 file.\n/*f90pp*/\n") test.run(arguments = '.', stderr = None) test.must_match(obj_ + 'test01' + _obj, "This is a .f file.\n") -test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") test.must_match(obj_ + 'test03' + _obj, "This is a .for file.\n") -test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") test.must_match(obj_ + 'test05' + _obj, "This is a .ftn file.\n") -test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") test.must_match(obj_ + 'test07' + _obj, "This is a .fpp file.\n") -test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") test.must_match(obj_ + 'test11' + _obj, "This is a .f90 file.\n") -test.must_match(obj_ + 'test12' + _obj, "This is a .F90 file.\n") test.must_match(obj_ + 'test21' + _obj, "This is a .f90 file.\n") -test.must_match(obj_ + 'test22' + _obj, "This is a .F90 file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") + test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") + test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") + test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") + test.must_match(obj_ + 'test12' + _obj, "This is a .F90 file.\n") + test.must_match(obj_ + 'test22' + _obj, "This is a .F90 file.\n") test.pass_test() diff --git a/test/Fortran/SHF95COM.py b/test/Fortran/SHF95COM.py index e31cf45..85de45e 100644 --- a/test/Fortran/SHF95COM.py +++ b/test/Fortran/SHF95COM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _obj = TestSCons._shobj @@ -72,18 +75,21 @@ test.write('test22.F95', "This is a .F95 file.\n/*f95pp*/\n") test.run(arguments = '.', stderr = None) test.must_match(obj_ + 'test01' + _obj, "This is a .f file.\n") -test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") test.must_match(obj_ + 'test03' + _obj, "This is a .for file.\n") -test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") test.must_match(obj_ + 'test05' + _obj, "This is a .ftn file.\n") -test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") test.must_match(obj_ + 'test07' + _obj, "This is a .fpp file.\n") -test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") test.must_match(obj_ + 'test13' + _obj, "This is a .f95 file.\n") -test.must_match(obj_ + 'test14' + _obj, "This is a .F95 file.\n") test.must_match(obj_ + 'test21' + _obj, "This is a .f95 file.\n") -test.must_match(obj_ + 'test22' + _obj, "This is a .F95 file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") + test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") + test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") + test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") + test.must_match(obj_ + 'test14' + _obj, "This is a .F95 file.\n") + test.must_match(obj_ + 'test22' + _obj, "This is a .F95 file.\n") test.pass_test() diff --git a/test/Fortran/SHFORTRANCOM.py b/test/Fortran/SHFORTRANCOM.py index 56958b2..5c42864 100644 --- a/test/Fortran/SHFORTRANCOM.py +++ b/test/Fortran/SHFORTRANCOM.py @@ -25,6 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +is_windows = ( sys.platform =='win32') _python_ = TestSCons._python_ _obj = TestSCons._shobj @@ -59,13 +62,16 @@ test.write('test08.FPP', "This is a .FPP file.\n/*fortranpp*/\n") test.run(arguments = '.', stderr = None) test.must_match(obj_ + 'test01' + _obj, "This is a .f file.\n") -test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") test.must_match(obj_ + 'test03' + _obj, "This is a .for file.\n") -test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") test.must_match(obj_ + 'test05' + _obj, "This is a .ftn file.\n") -test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") test.must_match(obj_ + 'test07' + _obj, "This is a .fpp file.\n") -test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") +if not is_windows: + # Skip checking files we expect to differ in behavior + # based on file extension case + test.must_match(obj_ + 'test02' + _obj, "This is a .F file.\n") + test.must_match(obj_ + 'test04' + _obj, "This is a .FOR file.\n") + test.must_match(obj_ + 'test06' + _obj, "This is a .FTN file.\n") + test.must_match(obj_ + 'test08' + _obj, "This is a .FPP file.\n") test.pass_test() diff --git a/test/M4/M4.py b/test/M4/M4.py index 4306558..76010e6 100644 --- a/test/M4/M4.py +++ b/test/M4/M4.py @@ -59,7 +59,13 @@ line 3 test.run() -test.must_match(test.workpath('aaa.x'), "line 1\nmym4.py\nline 3\n") +import sys + +if sys.platform == 'win32': + # Handle carriage returns. + test.must_match(test.workpath('aaa.x'), "line 1\r\nmym4.py\r\nline 3\r\n") +else: + test.must_match(test.workpath('aaa.x'), "line 1\nmym4.py\nline 3\n") |