diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-13 15:33:43 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-13 15:33:43 (GMT) |
commit | b48f4cb7b1bc00ca606bd71191fcddcc99be53f6 (patch) | |
tree | 681c616530aecc39d192ff2270578a7c58430621 /test/Fortran/F90PATH.py | |
parent | 52fcda2435759339de636e5d5abad71b0f5372ad (diff) | |
download | SCons-b48f4cb7b1bc00ca606bd71191fcddcc99be53f6.zip SCons-b48f4cb7b1bc00ca606bd71191fcddcc99be53f6.tar.gz SCons-b48f4cb7b1bc00ca606bd71191fcddcc99be53f6.tar.bz2 |
Handle Visual Studio project and solution files in Unicode. (Chen Lee)
Diffstat (limited to 'test/Fortran/F90PATH.py')
-rw-r--r-- | test/Fortran/F90PATH.py | 134 |
1 files changed, 117 insertions, 17 deletions
diff --git a/test/Fortran/F90PATH.py b/test/Fortran/F90PATH.py index c1b6f49..87ddda1 100644 --- a/test/Fortran/F90PATH.py +++ b/test/Fortran/F90PATH.py @@ -58,11 +58,17 @@ LIBPATH = os.path.join(base, 'lib') LIBS = ['irc'] os.environ['LD_LIBRARY_PATH'] = LIBPATH -test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2') +test.subdir('include', + 'subdir', + ['subdir', 'include'], + 'foobar', + 'inc2') + + test.write('SConstruct', """ env = Environment(F90 = r'%s', - F90PATH = ['$FOO'], + F90PATH = ['$FOO', '${TARGET.dir}', '${SOURCE.dir}'], LINK = '$F90', LIBPATH = %s, LIBS = %s, @@ -74,7 +80,7 @@ SConscript('subdir/SConscript', "env") BuildDir('variant', 'subdir', 0) include = Dir('include') env = Environment(F90 = r'%s', - F90PATH=[include], + F90PATH=[include, '#foobar', '#subdir'], LINK = '$F90', LIBPATH = %s, LIBS = %s) @@ -103,6 +109,8 @@ r""" PROGRAM PROG PRINT *, 'subdir/prog.f90' include 'foo.f90' + include 'sss.f90' + include 'ttt.f90' STOP END """) @@ -118,24 +126,54 @@ r""" PRINT *, 'subdir/include/bar.f90 1' """) +test.write(['subdir', 'sss.f90'], +r""" + PRINT *, 'subdir/sss.f90' +""") + +test.write(['subdir', 'ttt.f90'], +r""" + PRINT *, 'subdir/ttt.f90' +""") + test.run(arguments = args) test.run(program = test.workpath(prog), - stdout = " subdir/prog.f90\n include/foo.f90 1\n include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 1 + include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(subdir_prog), - stdout = " subdir/prog.f90\n subdir/include/foo.f90 1\n subdir/include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + subdir/include/foo.f90 1 + subdir/include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(variant_prog), - stdout = " subdir/prog.f90\n include/foo.f90 1\n include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 1 + include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") # Make sure we didn't duplicate the source file in the variant subdirectory. test.must_not_exist(test.workpath('variant', 'prog.f90')) test.up_to_date(arguments = args) + + test.write(['include', 'foo.f90'], r""" PRINT *, 'include/foo.f90 2' @@ -145,19 +183,39 @@ r""" test.run(arguments = args) test.run(program = test.workpath(prog), - stdout = " subdir/prog.f90\n include/foo.f90 2\n include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 2 + include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(subdir_prog), - stdout = " subdir/prog.f90\n subdir/include/foo.f90 1\n subdir/include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + subdir/include/foo.f90 1 + subdir/include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(variant_prog), - stdout = " subdir/prog.f90\n include/foo.f90 2\n include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 2 + include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") # Make sure we didn't duplicate the source file in the variant subdirectory. test.must_not_exist(test.workpath('variant', 'prog.f90')) test.up_to_date(arguments = args) + + # test.write(['include', 'bar.f90'], r""" @@ -167,23 +225,43 @@ r""" test.run(arguments = args) test.run(program = test.workpath(prog), - stdout = " subdir/prog.f90\n include/foo.f90 2\n include/bar.f90 2\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 2 + include/bar.f90 2 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(subdir_prog), - stdout = " subdir/prog.f90\n subdir/include/foo.f90 1\n subdir/include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + subdir/include/foo.f90 1 + subdir/include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(variant_prog), - stdout = " subdir/prog.f90\n include/foo.f90 2\n include/bar.f90 2\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 2 + include/bar.f90 2 + subdir/sss.f90 + subdir/ttt.f90 +""") # Make sure we didn't duplicate the source file in the variant subdirectory. test.must_not_exist(test.workpath('variant', 'prog.f90')) test.up_to_date(arguments = args) + + # Change F90PATH and make sure we don't rebuild because of it. test.write('SConstruct', """ env = Environment(F90 = r'%s', - F90PATH = Split('inc2 include'), + F90PATH = Split('inc2 include ${TARGET.dir} ${SOURCE.dir}'), LINK = '$F90', LIBPATH = %s, LIBS = %s) @@ -194,7 +272,7 @@ SConscript('subdir/SConscript', "env") BuildDir('variant', 'subdir', 0) include = Dir('include') env = Environment(F90 = r'%s', - F90PATH=['inc2', include], + F90PATH=['inc2', include, '#foobar', '#subdir'], LINK = '$F90', LIBPATH = %s, LIBS = %s) @@ -203,6 +281,8 @@ SConscript('variant/SConscript', "env") test.up_to_date(arguments = args) + + # test.write(['inc2', 'foo.f90'], r""" @@ -213,14 +293,34 @@ r""" test.run(arguments = args) test.run(program = test.workpath(prog), - stdout = " subdir/prog.f90\n inc2/foo.f90 1\n include/bar.f90 2\n") + stdout = """\ + subdir/prog.f90 + inc2/foo.f90 1 + include/bar.f90 2 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(subdir_prog), - stdout = " subdir/prog.f90\n subdir/include/foo.f90 1\n subdir/include/bar.f90 1\n") + stdout = """\ + subdir/prog.f90 + subdir/include/foo.f90 1 + subdir/include/bar.f90 1 + subdir/sss.f90 + subdir/ttt.f90 +""") test.run(program = test.workpath(variant_prog), - stdout = " subdir/prog.f90\n include/foo.f90 2\n include/bar.f90 2\n") + stdout = """\ + subdir/prog.f90 + include/foo.f90 2 + include/bar.f90 2 + subdir/sss.f90 + subdir/ttt.f90 +""") test.up_to_date(arguments = args) + + test.pass_test() |