From c3d5ef3df00ebfb6c6cd33b4c906222517b2fdc1 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Fri, 14 Oct 2005 16:23:52 +0000 Subject: Get rid of indentation tabs in the test scripts and have runtest.py invoke them with the python -tt option to keep them out. --- etc/TestSCons.py | 44 +++++----- runtest.py | 2 +- src/engine/SCons/ActionTests.py | 92 ++++++++++---------- src/engine/SCons/BuilderTests.py | 38 ++++---- src/engine/SCons/EnvironmentTests.py | 94 ++++++++++---------- src/engine/SCons/ErrorsTests.py | 8 +- src/engine/SCons/Scanner/IDLTests.py | 40 ++++----- src/engine/SCons/Sig/MD5Tests.py | 32 +++---- src/engine/SCons/Sig/TimeStampTests.py | 32 +++---- src/engine/SCons/Tool/JavaCommonTests.py | 8 +- src/engine/SCons/Tool/msvsTests.py | 10 +-- src/engine/SCons/WarningsTests.py | 2 +- src/test_setup.py | 8 +- test/AR/AR.py | 10 +-- test/AR/ARFLAGS.py | 10 +-- test/AS/AS.py | 18 ++-- test/BuildDir/BuildDir.py | 30 +++---- test/BuildDir/removed-files.py | 4 +- test/CC/CC.py | 22 ++--- test/CC/CCFLAGS.py | 10 +-- test/CC/SHCC.py | 12 +-- test/CC/SHCCFLAGS.py | 4 +- test/CFILESUFFIX.py | 8 +- test/CPPDEFINES.py | 8 +- test/CPPFLAGS.py | 4 +- test/CPPPATH.py | 6 +- test/CXX/CXX.py | 20 ++--- test/CXX/CXXFILESUFFIX.py | 8 +- test/CXX/SHCXX.py | 12 +-- test/CXX/SHCXXFLAGS.py | 4 +- test/Default.py | 8 +- test/Fortran/F77.py | 6 +- test/Fortran/F77COM.py | 6 +- test/Fortran/F77FLAGS.py | 6 +- test/Fortran/F90.py | 6 +- test/Fortran/F90COM.py | 6 +- test/Fortran/F90FLAGS.py | 6 +- test/Fortran/F95.py | 6 +- test/Fortran/F95COM.py | 6 +- test/Fortran/F95FLAGS.py | 6 +- test/Fortran/FORTRAN.py | 6 +- test/Fortran/FORTRANCOM.py | 6 +- test/Fortran/FORTRANFLAGS.py | 6 +- test/Fortran/SHF77.py | 2 +- test/Fortran/SHF77COM.py | 2 +- test/Fortran/SHF77FLAGS.py | 2 +- test/Fortran/SHF90.py | 2 +- test/Fortran/SHF90COM.py | 2 +- test/Fortran/SHF90FLAGS.py | 2 +- test/Fortran/SHF95.py | 2 +- test/Fortran/SHF95COM.py | 2 +- test/Fortran/SHF95FLAGS.py | 2 +- test/Fortran/SHFORTRAN.py | 2 +- test/Fortran/SHFORTRANCOM.py | 2 +- test/Fortran/SHFORTRANFLAGS.py | 2 +- test/IDL/midl.py | 118 ++++++++++++------------- test/LEX/LEX.py | 20 ++--- test/LEX/LEXFLAGS.py | 12 +-- test/LIBPATH.py | 12 +-- test/LIBPREFIX.py | 2 +- test/LIBPREFIXES.py | 10 +-- test/LIBSUFFIX.py | 2 +- test/LIBSUFFIXES.py | 10 +-- test/LINK/LINK.py | 12 +-- test/LINK/LINKFLAGS.py | 12 +-- test/LINK/SHLINK.py | 8 +- test/LINK/SHLINKFLAGS.py | 8 +- test/Library.py | 32 +++---- test/LoadableModule.py | 24 +++--- test/MSVS/vs-7.0-files.py | 2 +- test/MSVS/vs-7.1-files.py | 2 +- test/NodeOps.py | 12 +-- test/Object.py | 22 ++--- test/Perforce/Perforce.py | 8 +- test/PharLap.py | 144 +++++++++++++++---------------- test/Program.py | 106 +++++++++++------------ test/RANLIB.py | 10 +-- test/RANLIBFLAGS.py | 10 +-- test/Repository/CPPPATH.py | 12 +-- test/Repository/LIBPATH.py | 12 +-- test/Repository/Program.py | 58 ++++++------- test/Repository/StaticLibrary.py | 28 +++--- test/Repository/absolute-path.py | 16 ++-- test/Repository/include.py | 28 +++--- test/Repository/link-object.py | 16 ++-- test/Repository/multi-dir.py | 18 ++-- test/Repository/no-repository.py | 14 +-- test/Repository/signature-order.py | 14 +-- test/Repository/top-level-path.py | 16 ++-- test/Repository/variants.py | 90 +++++++++---------- test/Repository/within-repository.py | 28 +++--- test/SHLIBPREFIX.py | 2 +- test/SHLIBSUFFIX.py | 2 +- test/SWIG/SWIG.py | 14 +-- test/SharedLibrary.py | 34 ++++---- test/TAR/TAR.py | 2 +- test/TAR/TARFLAGS.py | 4 +- test/TEX/LATEX.py | 2 +- test/TEX/LATEXFLAGS.py | 2 +- test/TEX/PDFLATEX.py | 2 +- test/TEX/PDFLATEXFLAGS.py | 2 +- test/TEX/PDFTEX.py | 2 +- test/TEX/PDFTEXFLAGS.py | 2 +- test/TEX/TEX.py | 10 +-- test/TEX/TEXFLAGS.py | 2 +- test/WhereIs.py | 4 +- test/YACC/YACC.py | 18 ++-- test/YACC/YACCFLAGS.py | 10 +-- test/ZIP/ZIP.py | 2 +- test/build-errors.py | 6 +- test/errors.py | 6 +- test/expansion.py | 24 +++--- test/file-names.py | 2 +- test/long-lines.py | 18 ++-- test/multi.py | 11 ++- test/option--C.py | 20 ++--- test/option--I.py | 6 +- test/option--R.py | 4 +- test/option--S.py | 2 +- test/option--W.py | 8 +- test/option--cs.py | 6 +- test/option--debug.py | 6 +- test/option--implicit-cache.py | 20 ++--- test/option--la.py | 2 +- test/option--ld.py | 2 +- test/option--lw.py | 2 +- test/option--npd.py | 2 +- test/option--override.py | 2 +- test/option--warn.py | 4 +- test/option--wf.py | 2 +- test/option--wuv.py | 4 +- test/option-b.py | 2 +- test/option-d.py | 26 +++--- test/option-e.py | 4 +- test/option-l.py | 6 +- test/option-m.py | 2 +- test/option-o.py | 6 +- test/option-p.py | 2 +- test/option-r.py | 4 +- test/option-t.py | 4 +- test/option-w.py | 4 +- test/option/debug-dtree.py | 6 +- test/option/debug-includes.py | 6 +- test/option/debug-stree.py | 6 +- test/option/debug-tree.py | 6 +- test/same-name.py | 6 +- test/scan-once.py | 6 +- test/sconsign/script.py | 32 +++---- test/signature-order.py | 12 +-- test/strfunction.py | 16 ++-- 150 files changed, 1043 insertions(+), 1040 deletions(-) diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 5dce768..901c762 100644 --- a/etc/TestSCons.py +++ b/etc/TestSCons.py @@ -106,37 +106,37 @@ class TestSCons(TestCommon): """ def __init__(self, **kw): - """Initialize an SCons testing object. + """Initialize an SCons testing object. - If they're not overridden by keyword arguments, this - initializes the object with the following default values: + If they're not overridden by keyword arguments, this + initializes the object with the following default values: - program = 'scons' if it exists, - else 'scons.py' - interpreter = 'python' - match = match_exact - workdir = '' + program = 'scons' if it exists, + else 'scons.py' + interpreter = 'python' + match = match_exact + workdir = '' The workdir value means that, by default, a temporary workspace directory is created for a TestSCons environment. In addition, - this method changes directory (chdir) to the workspace directory, - so an explicit "chdir = '.'" on all of the run() method calls - is not necessary. - """ - if not kw.has_key('program'): + this method changes directory (chdir) to the workspace directory, + so an explicit "chdir = '.'" on all of the run() method calls + is not necessary. + """ + if not kw.has_key('program'): kw['program'] = os.environ.get('SCONS') if not kw['program']: if os.path.exists('scons'): kw['program'] = 'scons' else: kw['program'] = 'scons.py' - if not kw.has_key('interpreter') and not os.environ.get('SCONS_EXEC'): - kw['interpreter'] = [python, '-tt'] - if not kw.has_key('match'): - kw['match'] = match_exact - if not kw.has_key('workdir'): - kw['workdir'] = '' - apply(TestCommon.__init__, [self], kw) + if not kw.has_key('interpreter') and not os.environ.get('SCONS_EXEC'): + kw['interpreter'] = [python, '-tt'] + if not kw.has_key('match'): + kw['match'] = match_exact + if not kw.has_key('workdir'): + kw['workdir'] = '' + apply(TestCommon.__init__, [self], kw) def Environment(self, ENV=None, *args, **kw): """ @@ -482,8 +482,8 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS']) else: workpath = self.workpath() - if not sconscript: - sconscript = self.workpath('SConstruct') + if not sconscript: + sconscript = self.workpath('SConstruct') exec_script_main = "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-%s'), join(sys.prefix, 'scons-%s'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons') ] + sys.path; import SCons.Script; SCons.Script.main()" % (self._scons_version, self._scons_version) exec_script_main_xml = string.replace(exec_script_main, "'", "'") diff --git a/runtest.py b/runtest.py index be94a35..964b441 100644 --- a/runtest.py +++ b/runtest.py @@ -495,7 +495,7 @@ class Unbuffered: sys.stdout = Unbuffered(sys.stdout) for t in tests: - t.command_args = [python] + t.command_args = [python, '-tt'] if debug: t.command_args.append(debug) t.command_args.append(t.abspath) diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index ff23cd7..011cc0d 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -540,7 +540,7 @@ class _ActionActionTestCase(unittest.TestCase): def exitstatfunc(stat, result=exitstatfunc_result): result.append(stat) - return stat + return stat result = a("out", "in", env, exitstatfunc=exitstatfunc) assert result == 0, result @@ -840,37 +840,37 @@ class CommandActionTestCase(unittest.TestCase): s = act4.strfunction([t1], [s1], env) assert s is None, s - act = SCons.Action.CommandAction("@foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("@foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("@-foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("@-foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("-@foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("-@foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("-foo bar") - s = act.strfunction([], [], env) - assert s == "foo bar", s + act = SCons.Action.CommandAction("-foo bar") + s = act.strfunction([], [], env) + assert s == "foo bar", s - act = SCons.Action.CommandAction("@ foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("@ foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("@- foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("@- foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("-@ foo bar") - s = act.strfunction([], [], env) - assert s == "", s + act = SCons.Action.CommandAction("-@ foo bar") + s = act.strfunction([], [], env) + assert s == "", s - act = SCons.Action.CommandAction("- foo bar") - s = act.strfunction([], [], env) - assert s == "foo bar", s + act = SCons.Action.CommandAction("- foo bar") + s = act.strfunction([], [], env) + assert s == "foo bar", s def test_execute(self): """Test execution of command Actions @@ -994,33 +994,33 @@ class CommandActionTestCase(unittest.TestCase): r = act([], [], env.Copy(out = outfile)) assert r == expect_nonexecutable, "r == %d" % r - act = SCons.Action.CommandAction('%s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 1, r + act = SCons.Action.CommandAction('%s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 1, r - act = SCons.Action.CommandAction('@%s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 1, r + act = SCons.Action.CommandAction('@%s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 1, r - act = SCons.Action.CommandAction('@-%s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 0, r + act = SCons.Action.CommandAction('@-%s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 0, r - act = SCons.Action.CommandAction('-%s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 0, r + act = SCons.Action.CommandAction('-%s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 0, r - act = SCons.Action.CommandAction('@ %s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 1, r + act = SCons.Action.CommandAction('@ %s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 1, r - act = SCons.Action.CommandAction('@- %s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 0, r + act = SCons.Action.CommandAction('@- %s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 0, r - act = SCons.Action.CommandAction('- %s %s 1' % (python, exit_py)) - r = act([], [], env) - assert r == 0, r + act = SCons.Action.CommandAction('- %s %s 1' % (python, exit_py)) + r = act([], [], env) + assert r == 0, r def _DO_NOT_EXECUTE_test_pipe_execute(self): """Test capturing piped output from an action diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 3c98e27..233336c 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -778,20 +778,20 @@ class BuilderTestCase(unittest.TestCase): tgt = builder2(env, target='baz', source=['test.bar', 'test2.foo', 'test3.txt'])[0] - s = str(tgt) - assert s == 'baz', s - s = map(str, tgt.sources) - assert s == ['test.foo', 'test2.foo', 'test3.txt'], s - s = map(str, tgt.sources[0].sources) - assert s == ['test.bar'], s + s = str(tgt) + assert s == 'baz', s + s = map(str, tgt.sources) + assert s == ['test.foo', 'test2.foo', 'test3.txt'], s + s = map(str, tgt.sources[0].sources) + assert s == ['test.bar'], s tgt = builder2(env, None, 'aaa.bar')[0] - s = str(tgt) - assert s == 'aaa', s - s = map(str, tgt.sources) - assert s == ['aaa.foo'], s - s = map(str, tgt.sources[0].sources) - assert s == ['aaa.bar'], s + s = str(tgt) + assert s == 'aaa', s + s = map(str, tgt.sources) + assert s == ['aaa.foo'], s + s = map(str, tgt.sources[0].sources) + assert s == ['aaa.bar'], s builder3 = SCons.Builder.MultiStepBuilder(action = 'foo', src_builder = 'xyzzy', @@ -810,14 +810,14 @@ class BuilderTestCase(unittest.TestCase): suffix='.exe', src_suffix='.obj') tgt = builder6(env, 'test', 'test.i')[0] - s = str(tgt) + s = str(tgt) assert s == 'test.exe', s - s = map(str, tgt.sources) - assert s == ['test_wrap.obj'], s - s = map(str, tgt.sources[0].sources) - assert s == ['test_wrap.c'], s - s = map(str, tgt.sources[0].sources[0].sources) - assert s == ['test.i'], s + s = map(str, tgt.sources) + assert s == ['test_wrap.obj'], s + s = map(str, tgt.sources[0].sources) + assert s == ['test_wrap.c'], s + s = map(str, tgt.sources[0].sources[0].sources) + assert s == ['test.i'], s def test_CompositeBuilder(self): """Testing CompositeBuilder class.""" diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 4b222b8..caf8b4a 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -38,7 +38,7 @@ def diff_env(env1, env2): s2 = "env2 = {\n" d = {} for k in env1._dict.keys() + env2._dict.keys(): - d[k] = None + d[k] = None keys = d.keys() keys.sort() for k in keys: @@ -60,7 +60,7 @@ def diff_dict(d1, d2): s2 = "d2 = {\n" d = {} for k in d1.keys() + d2.keys(): - d[k] = None + d[k] = None keys = d.keys() keys.sort() for k in keys: @@ -627,27 +627,27 @@ class BaseTestCase(unittest.TestCase): def test_Builder_execs(self): - """Test Builder execution through different environments + """Test Builder execution through different environments - One environment is initialized with a single - Builder object, one with a list of a single Builder - object, and one with a list of two Builder objects. - """ - global built_it + One environment is initialized with a single + Builder object, one with a list of a single Builder + object, and one with a list of two Builder objects. + """ + global built_it - b1 = Builder() - b2 = Builder() + b1 = Builder() + b2 = Builder() - built_it = {} + built_it = {} env3 = Environment() env3.Replace(BUILDERS = { 'builder1' : b1, 'builder2' : b2 }) - env3.builder1.execute(target = 'out1') - env3.builder2.execute(target = 'out2') - env3.builder1.execute(target = 'out3') - assert built_it['out1'] - assert built_it['out2'] - assert built_it['out3'] + env3.builder1.execute(target = 'out1') + env3.builder2.execute(target = 'out2') + env3.builder1.execute(target = 'out3') + assert built_it['out1'] + assert built_it['out2'] + assert built_it['out3'] env4 = env3.Copy() assert env4.builder1.env is env4, "builder1.env (%s) == env3 (%s)?" % (env4.builder1.env, env3) @@ -747,13 +747,13 @@ class BaseTestCase(unittest.TestCase): assert s == [s1, s1, None, s3, s3], s def test_ENV(self): - """Test setting the external ENV in Environments - """ - env = Environment() - assert env.Dictionary().has_key('ENV') + """Test setting the external ENV in Environments + """ + env = Environment() + assert env.Dictionary().has_key('ENV') - env = Environment(ENV = { 'PATH' : '/foo:/bar' }) - assert env.Dictionary('ENV')['PATH'] == '/foo:/bar' + env = Environment(ENV = { 'PATH' : '/foo:/bar' }) + assert env.Dictionary('ENV')['PATH'] == '/foo:/bar' def test_ReservedVariables(self): """Test generation of warnings when reserved variable names @@ -1383,28 +1383,28 @@ def generate(env): assert x is None, x def test_Dictionary(self): - """Test retrieval of known construction variables - - Fetch them from the Dictionary and check for well-known - defaults that get inserted. - """ - env = Environment(XXX = 'x', YYY = 'y', ZZZ = 'z') - assert env.Dictionary('XXX') == 'x' - assert env.Dictionary('YYY') == 'y' - assert env.Dictionary('XXX', 'ZZZ') == ['x', 'z'] - xxx, zzz = env.Dictionary('XXX', 'ZZZ') - assert xxx == 'x' - assert zzz == 'z' - assert env.Dictionary().has_key('BUILDERS') - assert env.Dictionary().has_key('CC') - assert env.Dictionary().has_key('CCFLAGS') - assert env.Dictionary().has_key('ENV') - - assert env['XXX'] == 'x' - env['XXX'] = 'foo' - assert env.Dictionary('XXX') == 'foo' - del env['XXX'] - assert not env.Dictionary().has_key('XXX') + """Test retrieval of known construction variables + + Fetch them from the Dictionary and check for well-known + defaults that get inserted. + """ + env = Environment(XXX = 'x', YYY = 'y', ZZZ = 'z') + assert env.Dictionary('XXX') == 'x' + assert env.Dictionary('YYY') == 'y' + assert env.Dictionary('XXX', 'ZZZ') == ['x', 'z'] + xxx, zzz = env.Dictionary('XXX', 'ZZZ') + assert xxx == 'x' + assert zzz == 'z' + assert env.Dictionary().has_key('BUILDERS') + assert env.Dictionary().has_key('CC') + assert env.Dictionary().has_key('CCFLAGS') + assert env.Dictionary().has_key('ENV') + + assert env['XXX'] == 'x' + env['XXX'] = 'foo' + assert env.Dictionary('XXX') == 'foo' + del env['XXX'] + assert not env.Dictionary().has_key('XXX') def test_FindIxes(self): "Test FindIxes()" @@ -2381,7 +2381,7 @@ def generate(env): assert i.path == 'dir2' def test_Install(self): - """Test the Install method""" + """Test the Install method""" env = Environment(FOO='iii', BAR='jjj') tgt = env.Install('export', [ 'build/foo1', 'build/foo2' ]) @@ -2428,7 +2428,7 @@ def generate(env): assert match, e def test_InstallAs(self): - """Test the InstallAs method""" + """Test the InstallAs method""" env = Environment(FOO='iii', BAR='jjj') tgt = env.InstallAs(target=string.split('foo1 foo2'), diff --git a/src/engine/SCons/ErrorsTests.py b/src/engine/SCons/ErrorsTests.py index b0b50d4..c63d988 100644 --- a/src/engine/SCons/ErrorsTests.py +++ b/src/engine/SCons/ErrorsTests.py @@ -38,21 +38,21 @@ class ErrorsTestCase(unittest.TestCase): assert e.errstr == "foo" def test_InternalError(self): - """Test the InternalError exception.""" + """Test the InternalError exception.""" try: raise SCons.Errors.InternalError, "test internal error" except SCons.Errors.InternalError, e: assert e.args == ("test internal error",) def test_UserError(self): - """Test the UserError exception.""" + """Test the UserError exception.""" try: raise SCons.Errors.UserError, "test user error" except SCons.Errors.UserError, e: assert e.args == ("test user error",) def test_ExplicitExit(self): - """Test the ExplicitExit exception.""" + """Test the ExplicitExit exception.""" try: raise SCons.Errors.ExplicitExit, "node" except SCons.Errors.ExplicitExit, e: @@ -61,4 +61,4 @@ class ErrorsTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(ErrorsTestCase, 'test_') if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) diff --git a/src/engine/SCons/Scanner/IDLTests.py b/src/engine/SCons/Scanner/IDLTests.py index 5f2bb1f..153951d 100644 --- a/src/engine/SCons/Scanner/IDLTests.py +++ b/src/engine/SCons/Scanner/IDLTests.py @@ -44,11 +44,11 @@ test.write('t1.idl',''' import "f3.idl"; [ - object, - uuid(22995106-CE26-4561-AF1B-C71C6934B840), - dual, - helpstring("IBarObject Interface"), - pointer_default(unique) + object, + uuid(22995106-CE26-4561-AF1B-C71C6934B840), + dual, + helpstring("IBarObject Interface"), + pointer_default(unique) ] interface IBarObject : IDispatch { @@ -62,11 +62,11 @@ test.write('t2.idl',""" import ; [ - object, - uuid(22995106-CE26-4561-AF1B-C71C6934B840), - dual, - helpstring(\"IBarObject Interface\"), - pointer_default(unique) + object, + uuid(22995106-CE26-4561-AF1B-C71C6934B840), + dual, + helpstring(\"IBarObject Interface\"), + pointer_default(unique) ] interface IBarObject : IDispatch { @@ -93,11 +93,11 @@ include \t \"never.idl\" const char* x = \"#include \" [ - object, - uuid(22995106-CE26-4561-AF1B-C71C6934B840), - dual, - helpstring(\"IBarObject Interface\"), - pointer_default(unique) + object, + uuid(22995106-CE26-4561-AF1B-C71C6934B840), + dual, + helpstring(\"IBarObject Interface\"), + pointer_default(unique) ] interface IBarObject : IDispatch { @@ -130,11 +130,11 @@ test.write('t4.idl',""" #include [ - object, - uuid(22995106-CE26-4561-AF1B-C71C6934B840), - dual, - helpstring(\"IBarObject Interface\"), - pointer_default(unique) + object, + uuid(22995106-CE26-4561-AF1B-C71C6934B840), + dual, + helpstring(\"IBarObject Interface\"), + pointer_default(unique) ] interface IBarObject : IDispatch { diff --git a/src/engine/SCons/Sig/MD5Tests.py b/src/engine/SCons/Sig/MD5Tests.py index 67bdfc9..ba18264 100644 --- a/src/engine/SCons/Sig/MD5Tests.py +++ b/src/engine/SCons/Sig/MD5Tests.py @@ -38,42 +38,42 @@ class my_obj: """ def __init__(self, value = ""): - self.value = value + self.value = value def get_signature(self): if not hasattr(self, "sig"): - self.sig = signature(self) - return self.sig + self.sig = signature(self) + return self.sig def get_contents(self): - return self.value + return self.value class MD5TestCase(unittest.TestCase): def test_current(self): - """Test deciding if an object is up-to-date + """Test deciding if an object is up-to-date - Simple comparison of different "signature" values. - """ - obj = my_obj('111') - assert not current(obj.get_signature(), signature(my_obj('110'))) - assert current(obj.get_signature(), signature(my_obj('111'))) - assert not current(obj.get_signature(), signature(my_obj('112'))) + Simple comparison of different "signature" values. + """ + obj = my_obj('111') + assert not current(obj.get_signature(), signature(my_obj('110'))) + assert current(obj.get_signature(), signature(my_obj('111'))) + assert not current(obj.get_signature(), signature(my_obj('112'))) def test_collect(self): - """Test collecting a list of signatures into a new signature value - """ + """Test collecting a list of signatures into a new signature value + """ s = map(signature, map(my_obj, ('111', '222', '333'))) assert '698d51a19d8a121ce581499d7b701668' == collect(s[0:1]) assert '8980c988edc2c78cc43ccb718c06efd5' == collect(s[0:2]) - assert '53fd88c84ff8a285eb6e0a687e55b8c7' == collect(s) + assert '53fd88c84ff8a285eb6e0a687e55b8c7' == collect(s) def test_signature(self): """Test generating a signature""" - o1 = my_obj(value = '111') + o1 = my_obj(value = '111') s = signature(o1) assert '698d51a19d8a121ce581499d7b701668' == s, s @@ -110,4 +110,4 @@ class MD5TestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(MD5TestCase, 'test_') if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) diff --git a/src/engine/SCons/Sig/TimeStampTests.py b/src/engine/SCons/Sig/TimeStampTests.py index 1fca73f..49c5cfb 100644 --- a/src/engine/SCons/Sig/TimeStampTests.py +++ b/src/engine/SCons/Sig/TimeStampTests.py @@ -36,10 +36,10 @@ class my_obj: """ def __init__(self, value = 0): - self.value = value + self.value = value def get_signature(self): - return self.value + return self.value def get_timestamp(self): return self.value @@ -48,23 +48,23 @@ class my_obj: class TimeStampTestCase(unittest.TestCase): def test_current(self): - """Test deciding if an object is up-to-date + """Test deciding if an object is up-to-date - Simple comparison of different timestamp values. - """ - o1 = my_obj(value = 111) - assert not current(o1.get_signature(), 110) - assert current(o1.get_signature(), 111) - assert current(o1.get_signature(), 112) + Simple comparison of different timestamp values. + """ + o1 = my_obj(value = 111) + assert not current(o1.get_signature(), 110) + assert current(o1.get_signature(), 111) + assert current(o1.get_signature(), 112) def test_collect(self): - """Test collecting a list of signatures into a new signature value - into a new timestamp value. - """ + """Test collecting a list of signatures into a new signature value + into a new timestamp value. + """ - assert 111 == collect((111,)) - assert 222 == collect((111, 222)) - assert 333 == collect((333, 222, 111)) + assert 111 == collect((111,)) + assert 222 == collect((111, 222)) + assert 333 == collect((333, 222, 111)) def test_signature(self): """Test generating a signature""" @@ -81,4 +81,4 @@ class TimeStampTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(TimeStampTestCase, 'test_') if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) diff --git a/src/engine/SCons/Tool/JavaCommonTests.py b/src/engine/SCons/Tool/JavaCommonTests.py index 352b7ee..f8f38c2 100644 --- a/src/engine/SCons/Tool/JavaCommonTests.py +++ b/src/engine/SCons/Tool/JavaCommonTests.py @@ -193,10 +193,10 @@ public class Test { pkg_dir, classes = SCons.Tool.JavaCommon.parse_java("""\ public class MyTabs { - private class MyInternal - { - } - private final static String PATH = "images\\\\"; + private class MyInternal + { + } + private final static String PATH = "images\\\\"; } """) assert pkg_dir == None, pkg_dir diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py index 4343521..53198d4 100644 --- a/src/engine/SCons/Tool/msvsTests.py +++ b/src/engine/SCons/Tool/msvsTests.py @@ -445,7 +445,7 @@ if __name__ == "__main__": print "Test MSVS 6 Registry" # print str(registry.root) if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) registry = DummyRegistry(regdata_6b) default_version = '6.0' @@ -456,7 +456,7 @@ if __name__ == "__main__": print "Test Other MSVS 6 Registry" # print str(registry.root) if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) registry = DummyRegistry(regdata_67) default_version = '7.0' @@ -467,7 +467,7 @@ if __name__ == "__main__": # print str(registry.root) print "Test MSVS 6 & 7 Registry" if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) registry = DummyRegistry(regdata_7) default_version = '7.0' @@ -478,7 +478,7 @@ if __name__ == "__main__": # print str(registry.root) print "Test MSVS 7 Registry" if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) registry = DummyRegistry(regdata_none) default_version = '6.0' @@ -489,4 +489,4 @@ if __name__ == "__main__": # print str(registry.root) print "Test Empty Registry" if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) diff --git a/src/engine/SCons/WarningsTests.py b/src/engine/SCons/WarningsTests.py index 38fa0f5..0964699 100644 --- a/src/engine/SCons/WarningsTests.py +++ b/src/engine/SCons/WarningsTests.py @@ -122,4 +122,4 @@ class WarningsTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(WarningsTestCase, 'test_') if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + sys.exit(1) diff --git a/src/test_setup.py b/src/test_setup.py index 7d220e2..b49dde4 100644 --- a/src/test_setup.py +++ b/src/test_setup.py @@ -113,9 +113,9 @@ class MyTestSCons(TestSCons.TestSCons): self.version_lib = os.path.join(self.lib_dir, scons_version) self.man_dir = os.path.join(self.prefix, 'man', 'man1') - self.prepend_bin_dir = lambda p, d=self.bin_dir: os.path.join(d, p) - self.prepend_bat_dir = lambda p, d=self.bat_dir: os.path.join(d, p) - self.prepend_man_dir = lambda p, d=self.man_dir: os.path.join(d, p) + self.prepend_bin_dir = lambda p, d=self.bin_dir: os.path.join(d, p) + self.prepend_bat_dir = lambda p, d=self.bat_dir: os.path.join(d, p) + self.prepend_man_dir = lambda p, d=self.man_dir: os.path.join(d, p) def run(self, *args, **kw): kw['chdir'] = scons_version @@ -157,7 +157,7 @@ class MyTestSCons(TestSCons.TestSCons): return 'Installed SCons man pages into %s' % self.man_dir def man_page_paths(self): - return map(self.prepend_man_dir, self._man_pages) + return map(self.prepend_man_dir, self._man_pages) def must_have_installed(self, paths): diff --git a/test/AR/AR.py b/test/AR/AR.py index 81a57b5..32419fa 100644 --- a/test/AR/AR.py +++ b/test/AR/AR.py @@ -59,7 +59,7 @@ test.write('foo.c', r""" void library_function(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -67,7 +67,7 @@ test.write('bar.c', r""" void library_function(void) { - printf("bar.c\n"); + printf("bar.c\n"); } """) @@ -75,9 +75,9 @@ test.write('main.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - library_function(); - exit (0); + argv[argc++] = "--"; + library_function(); + exit (0); } """) diff --git a/test/AR/ARFLAGS.py b/test/AR/ARFLAGS.py index 9a7e274..399170e 100644 --- a/test/AR/ARFLAGS.py +++ b/test/AR/ARFLAGS.py @@ -59,7 +59,7 @@ test.write('foo.c', r""" void library_function(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -67,7 +67,7 @@ test.write('bar.c', r""" void library_function(void) { - printf("bar.c\n"); + printf("bar.c\n"); } """) @@ -75,9 +75,9 @@ test.write('main.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - library_function(); - exit (0); + argv[argc++] = "--"; + library_function(); + exit (0); } """) diff --git a/test/AS/AS.py b/test/AS/AS.py index adace1e..0543a0c 100644 --- a/test/AS/AS.py +++ b/test/AS/AS.py @@ -197,7 +197,7 @@ ccc.Program(target = 'ccc', source = ['ccc.S', 'ccc_main.c']) .globl name name: .ascii "aaa.s" - .byte 0 + .byte 0 """) test.write('bbb.s', """\ @@ -207,7 +207,7 @@ name: .globl name name: .ascii "bbb.s" - .byte 0 + .byte 0 """) test.write('ccc.h', """\ @@ -222,7 +222,7 @@ name: .globl name name: .ascii STRING - .byte 0 + .byte 0 """) test.write('aaa_main.c', r""" @@ -317,19 +317,19 @@ ddd.Program(target = 'ddd', source = ['ddd.asm', 'ddd_main.c']) test.write('ccc.asm', """ DSEG segment - PUBLIC _name + PUBLIC _name _name byte "ccc.asm",0 DSEG ends - end + end """) test.write('ddd.asm', """ DSEG segment - PUBLIC _name + PUBLIC _name _name byte "ddd.asm",0 DSEG ends - end + end """) test.write('ccc_main.c', r""" @@ -408,14 +408,14 @@ fff.Program(target = 'fff', source = ['fff.asm', 'fff_main.c']) """ global name name: - db 'eee.asm',0 + db 'eee.asm',0 """) test.write('fff.asm', """ global name name: - db 'fff.asm',0 + db 'fff.asm',0 """) test.write('eee_main.c', r""" diff --git a/test/BuildDir/BuildDir.py b/test/BuildDir/BuildDir.py index 181d8aa..0bae185 100644 --- a/test/BuildDir/BuildDir.py +++ b/test/BuildDir/BuildDir.py @@ -134,9 +134,9 @@ test.write(['work1', 'src', 'f1.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf(F1_STR); - exit (0); + argv[argc++] = "--"; + printf(F1_STR); + exit (0); } """) @@ -146,9 +146,9 @@ test.write(['work1', 'src', 'f2.in'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf(F2_STR); - exit (0); + argv[argc++] = "--"; + printf(F2_STR); + exit (0); } """) @@ -158,9 +158,9 @@ test.write(['work1', 'src', 'f3.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf(F3_STR); - exit (0); + argv[argc++] = "--"; + printf(F3_STR); + exit (0); } """) @@ -170,9 +170,9 @@ test.write(['work1', 'src', 'f4.in'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf(F4_STR); - exit (0); + argv[argc++] = "--"; + printf(F4_STR); + exit (0); } """) @@ -328,9 +328,9 @@ test.write(['work2', 'prog.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("work2/prog.c\n"); - exit (0); + argv[argc++] = "--"; + printf("work2/prog.c\n"); + exit (0); } """) diff --git a/test/BuildDir/removed-files.py b/test/BuildDir/removed-files.py index 7582a93..3f528a3 100644 --- a/test/BuildDir/removed-files.py +++ b/test/BuildDir/removed-files.py @@ -54,7 +54,7 @@ test.write(['src', 'dep.cpp'], """\ int main(int argc, char* argv[]) { - return test_dep(); + return test_dep(); } """) @@ -78,7 +78,7 @@ test.write(['src', 'dep.h'], """\ inline int test_dep() { - return 1; + return 1; } #endif //DEP_H diff --git a/test/CC/CC.py b/test/CC/CC.py index e7795d3..a790baa 100644 --- a/test/CC/CC.py +++ b/test/CC/CC.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:8] != '/*link*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -72,7 +72,7 @@ infile = open(inf, 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:6] != '/*cc*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -88,7 +88,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:8] != '/*link*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -102,7 +102,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:6] != '/*cc*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -131,7 +131,7 @@ if os.path.normcase('.c') == os.path.normcase('.C'): cc = Environment().Dictionary('CC') env = Environment(LINK = r'%s mylink.py', CC = r'%s mycc.py', - CXX = cc) + CXX = cc) env.Program(target = 'test2', source = 'test2.C') """ % (python, python)) @@ -167,9 +167,9 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -177,9 +177,9 @@ test.write('bar.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) diff --git a/test/CC/CCFLAGS.py b/test/CC/CCFLAGS.py index 6664010..d05cdef 100644 --- a/test/CC/CCFLAGS.py +++ b/test/CC/CCFLAGS.py @@ -53,17 +53,17 @@ test.write('prog.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; + argv[argc++] = "--"; #ifdef FOO - printf("prog.c: FOO\n"); + printf("prog.c: FOO\n"); #endif #ifdef BAR - printf("prog.c: BAR\n"); + printf("prog.c: BAR\n"); #endif #ifdef BAZ - printf("prog.c: BAZ\n"); + printf("prog.c: BAZ\n"); #endif - exit (0); + exit (0); } """) diff --git a/test/CC/SHCC.py b/test/CC/SHCC.py index 35296c7..3679a9e 100644 --- a/test/CC/SHCC.py +++ b/test/CC/SHCC.py @@ -53,9 +53,9 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -63,9 +63,9 @@ test.write('bar.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) diff --git a/test/CC/SHCCFLAGS.py b/test/CC/SHCCFLAGS.py index 610fcd1..a830058 100644 --- a/test/CC/SHCCFLAGS.py +++ b/test/CC/SHCCFLAGS.py @@ -83,10 +83,10 @@ void doIt() { #ifdef FOO - printf("prog.c: FOO\n"); + printf("prog.c: FOO\n"); #endif #ifdef BAR - printf("prog.c: BAR\n"); + printf("prog.c: BAR\n"); #endif } """) diff --git a/test/CFILESUFFIX.py b/test/CFILESUFFIX.py index 90d3af4..a122fe0 100644 --- a/test/CFILESUFFIX.py +++ b/test/CFILESUFFIX.py @@ -55,10 +55,10 @@ input = r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("LEX\n"); - printf("%s\n"); - exit (0); + argv[argc++] = "--"; + printf("LEX\n"); + printf("%s\n"); + exit (0); } """ diff --git a/test/CPPDEFINES.py b/test/CPPDEFINES.py index 50b6abd..7c65401 100644 --- a/test/CPPDEFINES.py +++ b/test/CPPDEFINES.py @@ -90,14 +90,14 @@ test.write('prog.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; + argv[argc++] = "--"; #ifdef FOO - printf("prog.c: FOO %d\n", VAL); + printf("prog.c: FOO %d\n", VAL); #endif #ifdef BAR - printf("prog.c: BAR %d\n", VAL); + printf("prog.c: BAR %d\n", VAL); #endif - exit (0); + exit (0); } """) diff --git a/test/CPPFLAGS.py b/test/CPPFLAGS.py index 92c7d7c..72b10b7 100644 --- a/test/CPPFLAGS.py +++ b/test/CPPFLAGS.py @@ -60,7 +60,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -96,7 +96,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:clen] != '#' + compiler: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/CPPPATH.py b/test/CPPPATH.py index 9ce5e15..c9400f7 100644 --- a/test/CPPPATH.py +++ b/test/CPPPATH.py @@ -65,7 +65,7 @@ env.Program(target='prog', source='prog.c') test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 1\n" +#define FOO_STRING "include/foo.h 1\n" #include """) @@ -111,7 +111,7 @@ main(int argc, char *argv[]) test.write(['subdir', 'include', 'foo.h'], r""" -#define FOO_STRING "subdir/include/foo.h 1\n" +#define FOO_STRING "subdir/include/foo.h 1\n" #include "bar.h" """) @@ -160,7 +160,7 @@ test.up_to_date(arguments = args) test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 2\n" +#define FOO_STRING "include/foo.h 2\n" #include "bar.h" """) diff --git a/test/CXX/CXX.py b/test/CXX/CXX.py index 6f9f0ce..70a9b82 100644 --- a/test/CXX/CXX.py +++ b/test/CXX/CXX.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:8] != '/*link*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -72,7 +72,7 @@ infile = open(inf, 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:7] != '/*c++*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -88,7 +88,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:8] != '/*link*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -102,7 +102,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:7] != '/*c++*/': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -199,9 +199,9 @@ test.write('foo.cxx', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.cxx\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.cxx\n"); + exit (0); } """) @@ -211,9 +211,9 @@ test.write('bar.cxx', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.cxx\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.cxx\n"); + exit (0); } """) diff --git a/test/CXX/CXXFILESUFFIX.py b/test/CXX/CXXFILESUFFIX.py index d729076..8f4c4fa 100644 --- a/test/CXX/CXXFILESUFFIX.py +++ b/test/CXX/CXXFILESUFFIX.py @@ -55,10 +55,10 @@ input = r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("LEX\n"); - printf("%s\n"); - exit (0); + argv[argc++] = "--"; + printf("LEX\n"); + printf("%s\n"); + exit (0); } """ diff --git a/test/CXX/SHCXX.py b/test/CXX/SHCXX.py index a3c98c7..5c050d1 100644 --- a/test/CXX/SHCXX.py +++ b/test/CXX/SHCXX.py @@ -55,9 +55,9 @@ test.write('foo.cpp', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -67,9 +67,9 @@ test.write('bar.cpp', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) diff --git a/test/CXX/SHCXXFLAGS.py b/test/CXX/SHCXXFLAGS.py index 38feca1..049be6c 100644 --- a/test/CXX/SHCXXFLAGS.py +++ b/test/CXX/SHCXXFLAGS.py @@ -85,10 +85,10 @@ extern "C" void doIt() { #ifdef FOO - printf("prog.cpp: FOO\n"); + printf("prog.cpp: FOO\n"); #endif #ifdef BAR - printf("prog.cpp: BAR\n"); + printf("prog.cpp: BAR\n"); #endif } """) diff --git a/test/Default.py b/test/Default.py index ae0346a..cda34b2 100644 --- a/test/Default.py +++ b/test/Default.py @@ -96,7 +96,7 @@ Default(env.B(target = 'bar.out', source = 'bar.in')) for dir in ['one', 'two', 'three', 'four', 'five']: - test.run(chdir = dir) # no arguments, use the Default + test.run(chdir = dir) # no arguments, use the Default test.fail_test(test.read(test.workpath('one', 'foo.out')) != "one/foo.in\n") test.fail_test(os.path.exists(test.workpath('one', 'bar'))) @@ -175,7 +175,7 @@ Default('xxx.out') test.write(['nine', 'sub1', 'xxx.in'], "sub1/xxx.in\n") -test.run(chdir = 'nine') # no arguments, use the Default +test.run(chdir = 'nine') # no arguments, use the Default test.fail_test(os.path.exists(test.workpath('nine', 'xxx.out'))) test.fail_test(test.read(test.workpath('nine', 'sub1', 'xxx.out')) != "sub1/xxx.in\n") @@ -202,7 +202,7 @@ env.B(target = 'xxx.out', source = 'xxx.in') test.write(['ten', 'sub2', 'xxx.in'], "sub2/xxx.in\n") -test.run(chdir = 'ten') # no arguments, use the Default +test.run(chdir = 'ten') # no arguments, use the Default test.fail_test(os.path.exists(test.workpath('ten', 'xxx.out'))) test.fail_test(test.read(test.workpath('ten', 'sub2', 'xxx.out')) != "sub2/xxx.in\n") @@ -222,7 +222,7 @@ test.write(os.path.join('eleven', 'foo.in'), "eleven/foo.in\n"); test.write(os.path.join('eleven', 'bar.in'), "eleven/bar.in\n"); -test.run(chdir = 'eleven') # no arguments, use the Default +test.run(chdir = 'eleven') # no arguments, use the Default test.fail_test(test.read(test.workpath('eleven', 'foo.out')) != "eleven/foo.in\n") test.fail_test(os.path.exists(test.workpath('eleven', 'bar'))) diff --git a/test/Fortran/F77.py b/test/Fortran/F77.py index 403f6b1..1c27def 100644 --- a/test/Fortran/F77.py +++ b/test/Fortran/F77.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -83,7 +83,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F77COM.py b/test/Fortran/F77COM.py index 53e0a31..9de4d17 100644 --- a/test/Fortran/F77COM.py +++ b/test/Fortran/F77COM.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -79,7 +79,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F77FLAGS.py b/test/Fortran/F77FLAGS.py index 5aa8044..d50eeb9 100644 --- a/test/Fortran/F77FLAGS.py +++ b/test/Fortran/F77FLAGS.py @@ -50,7 +50,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -66,7 +66,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -83,7 +83,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:4] != '#g77': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F90.py b/test/Fortran/F90.py index 7825ae6..8f8bc45 100644 --- a/test/Fortran/F90.py +++ b/test/Fortran/F90.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -84,7 +84,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:length] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F90COM.py b/test/Fortran/F90COM.py index da679a8..bb52340 100644 --- a/test/Fortran/F90COM.py +++ b/test/Fortran/F90COM.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -79,7 +79,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F90FLAGS.py b/test/Fortran/F90FLAGS.py index 3ac5a29..69f1dfa 100644 --- a/test/Fortran/F90FLAGS.py +++ b/test/Fortran/F90FLAGS.py @@ -51,7 +51,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -67,7 +67,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -85,7 +85,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F95.py b/test/Fortran/F95.py index 23ed547..a19c904 100644 --- a/test/Fortran/F95.py +++ b/test/Fortran/F95.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -84,7 +84,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:length] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F95COM.py b/test/Fortran/F95COM.py index 14c03e6..26423f8 100644 --- a/test/Fortran/F95COM.py +++ b/test/Fortran/F95COM.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -79,7 +79,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/F95FLAGS.py b/test/Fortran/F95FLAGS.py index 9d958d4..883d9a3 100644 --- a/test/Fortran/F95FLAGS.py +++ b/test/Fortran/F95FLAGS.py @@ -50,7 +50,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -66,7 +66,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -84,7 +84,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/FORTRAN.py b/test/Fortran/FORTRAN.py index 0195558..47a0a89 100644 --- a/test/Fortran/FORTRAN.py +++ b/test/Fortran/FORTRAN.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -82,7 +82,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:4] != '#g77': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/FORTRANCOM.py b/test/Fortran/FORTRANCOM.py index 6fbaf8f..f79ad6d 100644 --- a/test/Fortran/FORTRANCOM.py +++ b/test/Fortran/FORTRANCOM.py @@ -52,7 +52,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -68,7 +68,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -79,7 +79,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/FORTRANFLAGS.py b/test/Fortran/FORTRANFLAGS.py index a4fb376..8d77d63 100644 --- a/test/Fortran/FORTRANFLAGS.py +++ b/test/Fortran/FORTRANFLAGS.py @@ -50,7 +50,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -66,7 +66,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:5] != '#link': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -83,7 +83,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:8] != '#fortran': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF77.py b/test/Fortran/SHF77.py index 2f259cd..233921b 100644 --- a/test/Fortran/SHF77.py +++ b/test/Fortran/SHF77.py @@ -47,7 +47,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF77COM.py b/test/Fortran/SHF77COM.py index 7501fbf..fa02487 100644 --- a/test/Fortran/SHF77COM.py +++ b/test/Fortran/SHF77COM.py @@ -43,7 +43,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF77FLAGS.py b/test/Fortran/SHF77FLAGS.py index 263e1a4..85c1168 100644 --- a/test/Fortran/SHF77FLAGS.py +++ b/test/Fortran/SHF77FLAGS.py @@ -56,7 +56,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:4] != '#g77': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF90.py b/test/Fortran/SHF90.py index b14c81d..66bd68d 100644 --- a/test/Fortran/SHF90.py +++ b/test/Fortran/SHF90.py @@ -47,7 +47,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF90COM.py b/test/Fortran/SHF90COM.py index 0ff8316..ffc9878 100644 --- a/test/Fortran/SHF90COM.py +++ b/test/Fortran/SHF90COM.py @@ -43,7 +43,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF90FLAGS.py b/test/Fortran/SHF90FLAGS.py index 6257adb..3997cbb 100644 --- a/test/Fortran/SHF90FLAGS.py +++ b/test/Fortran/SHF90FLAGS.py @@ -57,7 +57,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF95.py b/test/Fortran/SHF95.py index c95b366..d2d92a9 100644 --- a/test/Fortran/SHF95.py +++ b/test/Fortran/SHF95.py @@ -47,7 +47,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF95COM.py b/test/Fortran/SHF95COM.py index d335083..e28f863 100644 --- a/test/Fortran/SHF95COM.py +++ b/test/Fortran/SHF95COM.py @@ -43,7 +43,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHF95FLAGS.py b/test/Fortran/SHF95FLAGS.py index f5eb326..782a495 100644 --- a/test/Fortran/SHF95FLAGS.py +++ b/test/Fortran/SHF95FLAGS.py @@ -57,7 +57,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHFORTRAN.py b/test/Fortran/SHFORTRAN.py index 205a761..17a58f5 100644 --- a/test/Fortran/SHFORTRAN.py +++ b/test/Fortran/SHFORTRAN.py @@ -46,7 +46,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:8] != '#fortran': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHFORTRANCOM.py b/test/Fortran/SHFORTRANCOM.py index 16d38a6..f4d44dc 100644 --- a/test/Fortran/SHFORTRANCOM.py +++ b/test/Fortran/SHFORTRANCOM.py @@ -43,7 +43,7 @@ outfile = open(sys.argv[2], 'wb') infile = open(sys.argv[3], 'rb') for l in infile.readlines(): if l[:len(comment)] != comment: - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/Fortran/SHFORTRANFLAGS.py b/test/Fortran/SHFORTRANFLAGS.py index 1e4dc76..e96ade9 100644 --- a/test/Fortran/SHFORTRANFLAGS.py +++ b/test/Fortran/SHFORTRANFLAGS.py @@ -56,7 +56,7 @@ outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): if l[:8] != '#fortran': - outfile.write(l) + outfile.write(l) sys.exit(0) """) diff --git a/test/IDL/midl.py b/test/IDL/midl.py index 1de9640..af8babc 100644 --- a/test/IDL/midl.py +++ b/test/IDL/midl.py @@ -93,22 +93,22 @@ test.write('src/BarObject.h',''' #include "resource.h" class ATL_NO_VTABLE CBarObject : - public CComObjectRootEx, - public CComCoClass, - public IDispatchImpl + public CComObjectRootEx, + public CComCoClass, + public IDispatchImpl { public: - CBarObject() - { - } + CBarObject() + { + } DECLARE_REGISTRY_RESOURCEID(IDR_BAROBJECT) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CBarObject) - COM_INTERFACE_ENTRY(IBarObject) - COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(IBarObject) + COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() public: @@ -120,29 +120,29 @@ public: test.write('src/BarObject.rgs',""" HKCR { - Bar.BarObject.1 = s 'BarObject Class' - { - CLSID = s '{640BE9EC-B79D-4C9E-BB64-95D24854A303}' - } - Bar.BarObject = s 'BarObject Class' - { - CLSID = s '{640BE9EC-B79D-4C9E-BB64-95D24854A303}' - CurVer = s 'Bar.BarObject.1' - } - NoRemove CLSID - { - ForceRemove {640BE9EC-B79D-4C9E-BB64-95D24854A303} = s 'BarObject Class' - { - ProgID = s 'Bar.BarObject.1' - VersionIndependentProgID = s 'Bar.BarObject' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - 'TypeLib' = s '{73E5EA5F-9D45-463F-AA33-9F376AF7B643}' - } - } + Bar.BarObject.1 = s 'BarObject Class' + { + CLSID = s '{640BE9EC-B79D-4C9E-BB64-95D24854A303}' + } + Bar.BarObject = s 'BarObject Class' + { + CLSID = s '{640BE9EC-B79D-4C9E-BB64-95D24854A303}' + CurVer = s 'Bar.BarObject.1' + } + NoRemove CLSID + { + ForceRemove {640BE9EC-B79D-4C9E-BB64-95D24854A303} = s 'BarObject Class' + { + ProgID = s 'Bar.BarObject.1' + VersionIndependentProgID = s 'Bar.BarObject' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{73E5EA5F-9D45-463F-AA33-9F376AF7B643}' + } + } } """) @@ -234,44 +234,44 @@ test.write('src/bar.def',''' LIBRARY "bar.DLL" EXPORTS - DllCanUnloadNow @1 PRIVATE - DllGetClassObject @2 PRIVATE - DllRegisterServer @3 PRIVATE - DllUnregisterServer @4 PRIVATE + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE ''') test.write('src/bar.idl',''' import "oaidl.idl"; import "ocidl.idl"; - [ - object, - uuid(22995106-CE26-4561-AF1B-C71C6934B840), - dual, - helpstring("IBarObject Interface"), - pointer_default(unique) - ] - interface IBarObject : IDispatch - { - }; + [ + object, + uuid(22995106-CE26-4561-AF1B-C71C6934B840), + dual, + helpstring("IBarObject Interface"), + pointer_default(unique) + ] + interface IBarObject : IDispatch + { + }; [ - uuid(73E5EA5F-9D45-463F-AA33-9F376AF7B643), - version(1.0), - helpstring("bar 1.0 Type Library") + uuid(73E5EA5F-9D45-463F-AA33-9F376AF7B643), + version(1.0), + helpstring("bar 1.0 Type Library") ] library BARLib { - importlib("stdole32.tlb"); - importlib("stdole2.tlb"); - - [ - uuid(640BE9EC-B79D-4C9E-BB64-95D24854A303), - helpstring("BarObject Class") - ] - coclass BarObject - { - [default] interface IBarObject; - }; + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(640BE9EC-B79D-4C9E-BB64-95D24854A303), + helpstring("BarObject Class") + ] + coclass BarObject + { + [default] interface IBarObject; + }; }; ''') diff --git a/test/LEX/LEX.py b/test/LEX/LEX.py index 3f596fb..5515a3e 100644 --- a/test/LEX/LEX.py +++ b/test/LEX/LEX.py @@ -58,10 +58,10 @@ test.write('aaa.l', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("LEX\n"); - printf("aaa.l\n"); - exit (0); + argv[argc++] = "--"; + printf("LEX\n"); + printf("aaa.l\n"); + exit (0); } """) @@ -69,10 +69,10 @@ test.write('bbb.lex', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("LEX\n"); - printf("bbb.lex\n"); - exit (0); + argv[argc++] = "--"; + printf("LEX\n"); + printf("bbb.lex\n"); + exit (0); } """) @@ -104,8 +104,8 @@ bar.Program(target = 'bar', source = 'bar.l') lex = r""" %%%% -a printf("A%sA"); -b printf("B%sB"); +a printf("A%sA"); +b printf("B%sB"); %%%% int yywrap() diff --git a/test/LEX/LEXFLAGS.py b/test/LEX/LEXFLAGS.py index ba440da..87a869f 100644 --- a/test/LEX/LEXFLAGS.py +++ b/test/LEX/LEXFLAGS.py @@ -60,10 +60,10 @@ test.write('aaa.l', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("LEXFLAGS\n"); - printf("aaa.l\n"); - exit (0); + argv[argc++] = "--"; + printf("LEXFLAGS\n"); + printf("aaa.l\n"); + exit (0); } """) @@ -86,8 +86,8 @@ bar.Program(target = 'bar', source = 'bar.l') lex = r""" %%%% -a printf("A%sA"); -b printf("B%sB"); +a printf("A%sA"); +b printf("B%sB"); %%%% int yywrap() diff --git a/test/LIBPATH.py b/test/LIBPATH.py index 86e292a..c54d2ac 100644 --- a/test/LIBPATH.py +++ b/test/LIBPATH.py @@ -60,7 +60,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c\n"); + printf("f1.c\n"); } """) @@ -79,9 +79,9 @@ void f1(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f1(); - printf("prog.c\n"); + argv[argc++] = "--"; + f1(); + printf("prog.c\n"); return 0; } """) @@ -105,7 +105,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c 1\n"); + printf("f1.c 1\n"); } """) @@ -138,7 +138,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c 2\n"); + printf("f1.c 2\n"); } """) diff --git a/test/LIBPREFIX.py b/test/LIBPREFIX.py index bd10d36..a71e967 100644 --- a/test/LIBPREFIX.py +++ b/test/LIBPREFIX.py @@ -28,7 +28,7 @@ import TestSCons test = TestSCons.TestSCons() -test.pass_test() #XXX Short-circuit until this is implemented. +test.pass_test() #XXX Short-circuit until this is implemented. test.write('SConstruct', """ """) diff --git a/test/LIBPREFIXES.py b/test/LIBPREFIXES.py index 5ca427d..753b9b3 100644 --- a/test/LIBPREFIXES.py +++ b/test/LIBPREFIXES.py @@ -37,7 +37,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ env = Environment(LIBPREFIX = 'xxx-', - LIBPREFIXES = ['xxx-']) + LIBPREFIXES = ['xxx-']) lib = env.Library(target = 'foo', source = 'foo.c') env.Program(target = 'prog', source = ['prog.c', lib]) """) @@ -46,7 +46,7 @@ test.write('foo.c', r""" void foo(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -55,9 +55,9 @@ void foo(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - foo(); - printf("prog.c\n"); + argv[argc++] = "--"; + foo(); + printf("prog.c\n"); return 0; } """) diff --git a/test/LIBSUFFIX.py b/test/LIBSUFFIX.py index bd10d36..a71e967 100644 --- a/test/LIBSUFFIX.py +++ b/test/LIBSUFFIX.py @@ -28,7 +28,7 @@ import TestSCons test = TestSCons.TestSCons() -test.pass_test() #XXX Short-circuit until this is implemented. +test.pass_test() #XXX Short-circuit until this is implemented. test.write('SConstruct', """ """) diff --git a/test/LIBSUFFIXES.py b/test/LIBSUFFIXES.py index e61096a..c776ce0 100644 --- a/test/LIBSUFFIXES.py +++ b/test/LIBSUFFIXES.py @@ -37,7 +37,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ env = Environment(LIBSUFFIX = '.xxx', - LIBSUFFIXES = ['.xxx']) + LIBSUFFIXES = ['.xxx']) lib = env.Library(target = 'foo', source = 'foo.c') env.Program(target = 'prog', source = ['prog.c', lib]) """) @@ -46,7 +46,7 @@ test.write('foo.c', r""" void foo(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -55,9 +55,9 @@ void foo(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - foo(); - printf("prog.c\n"); + argv[argc++] = "--"; + foo(); + printf("prog.c\n"); return 0; } """) diff --git a/test/LINK/LINK.py b/test/LINK/LINK.py index 5333290..2d89352 100644 --- a/test/LINK/LINK.py +++ b/test/LINK/LINK.py @@ -54,9 +54,9 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -64,9 +64,9 @@ test.write('bar.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py index 9a6ef1c..ca1cd1a 100644 --- a/test/LINK/LINKFLAGS.py +++ b/test/LINK/LINKFLAGS.py @@ -55,9 +55,9 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -65,9 +65,9 @@ test.write('bar.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) diff --git a/test/LINK/SHLINK.py b/test/LINK/SHLINK.py index ff24f0c..8b9097d 100644 --- a/test/LINK/SHLINK.py +++ b/test/LINK/SHLINK.py @@ -57,8 +57,8 @@ test.write('foo.c', r""" void test() { - printf("foo.c\n"); - fflush(stdout); + printf("foo.c\n"); + fflush(stdout); } """) @@ -68,8 +68,8 @@ test.write('bar.c', r""" void test() { - printf("foo.c\n"); - fflush(stdout); + printf("foo.c\n"); + fflush(stdout); } """) diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py index c9ecf21..709ebc6 100644 --- a/test/LINK/SHLINKFLAGS.py +++ b/test/LINK/SHLINKFLAGS.py @@ -58,8 +58,8 @@ test.write('foo.c', r""" void test() { - printf("foo.c\n"); - fflush(stdout); + printf("foo.c\n"); + fflush(stdout); } """) @@ -69,8 +69,8 @@ test.write('bar.c', r""" void test() { - printf("foo.c\n"); - fflush(stdout); + printf("foo.c\n"); + fflush(stdout); } """) diff --git a/test/Library.py b/test/Library.py index f089e0c..e4626ab 100644 --- a/test/Library.py +++ b/test/Library.py @@ -41,7 +41,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c\n"); + printf("f1.c\n"); } """) @@ -49,7 +49,7 @@ test.write('f2a.c', r""" void f2a(void) { - printf("f2a.c\n"); + printf("f2a.c\n"); } """) @@ -57,7 +57,7 @@ test.write('f2b.c', r""" void f2b(void) { - printf("f2b.c\n"); + printf("f2b.c\n"); } """) @@ -65,7 +65,7 @@ test.write('f2c.c', r""" void f2c(void) { - printf("f2c.c\n"); + printf("f2c.c\n"); } """) @@ -73,7 +73,7 @@ test.write('f3a.c', r""" void f3a(void) { - printf("f3a.c\n"); + printf("f3a.c\n"); } """) @@ -81,7 +81,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c\n"); + printf("f3b.c\n"); } """) @@ -90,7 +90,7 @@ test.write('f3c.cpp', r""" extern "C" void f3c(void) { - printf("f3c.cpp\n"); + printf("f3c.cpp\n"); } """) @@ -108,15 +108,15 @@ void f3c(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f1(); - f2a(); - f2b(); - f2c(); - f3a(); - f3b(); - f3c(); - printf("prog.c\n"); + argv[argc++] = "--"; + f1(); + f2a(); + f2b(); + f2c(); + f3a(); + f3b(); + f3c(); + printf("prog.c\n"); return 0; } """) diff --git a/test/LoadableModule.py b/test/LoadableModule.py index f3b1959..5243fbf 100644 --- a/test/LoadableModule.py +++ b/test/LoadableModule.py @@ -60,7 +60,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c\n"); + printf("f1.c\n"); fflush(stdout); } """) @@ -75,19 +75,19 @@ extern int errno; int main(int argc, char *argv[]) { - argv[argc++] = "--"; + argv[argc++] = "--"; void *foo1_shobj = dlopen("__foo1_name__", RTLD_NOW); - if(!foo1_shobj){ - printf("Error loading foo1 '__foo1_name__' library at runtime, exiting.\n"); - printf("%d\n", errno); - perror(""); - return -1; - } - void (*f1)() = dlsym(foo1_shobj, "f1\0"); - (*f1)(); - printf("dlopenprog.c\n"); + if(!foo1_shobj){ + printf("Error loading foo1 '__foo1_name__' library at runtime, exiting.\n"); + printf("%d\n", errno); + perror(""); + return -1; + } + void (*f1)() = dlsym(foo1_shobj, "f1\0"); + (*f1)(); + printf("dlopenprog.c\n"); dlclose(foo1_shobj); - return 0; + return 0; } """ diff --git a/test/MSVS/vs-7.0-files.py b/test/MSVS/vs-7.0-files.py index 0ab4870..260ee76 100644 --- a/test/MSVS/vs-7.0-files.py +++ b/test/MSVS/vs-7.0-files.py @@ -207,7 +207,7 @@ python = os.path.join('$(PYTHON_ROOT)', os.path.split(sys.executable)[1]) test.must_exist(test.workpath('work1', 'Test.vcproj')) vcproj = test.read(['work1', 'Test.vcproj'], 'r') expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work1', 'SConstruct', - python=python) + python=python) # don't compare the pickled data assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) diff --git a/test/MSVS/vs-7.1-files.py b/test/MSVS/vs-7.1-files.py index d7ec165..30de516 100644 --- a/test/MSVS/vs-7.1-files.py +++ b/test/MSVS/vs-7.1-files.py @@ -209,7 +209,7 @@ python = os.path.join('$(PYTHON_ROOT)', os.path.split(sys.executable)[1]) test.must_exist(test.workpath('work1', 'Test.vcproj')) vcproj = test.read(['work1', 'Test.vcproj'], 'r') expect = test.msvs_substitute(expected_vcprojfile, '7.1', 'work1', 'SConstruct', - python=python) + python=python) # don't compare the pickled data assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) diff --git a/test/NodeOps.py b/test/NodeOps.py index 9a28c87..55f3557 100644 --- a/test/NodeOps.py +++ b/test/NodeOps.py @@ -123,10 +123,10 @@ extern "C" void doIt() { #ifdef FOO - printf("prog.cpp: FOO\n"); + printf("prog.cpp: FOO\n"); #endif #ifdef BAR - printf("prog.cpp: BAR\n"); + printf("prog.cpp: BAR\n"); #endif } """) @@ -187,7 +187,7 @@ void doIt() { #ifdef FOO - printf("prog.cpp: %s\n", boo_sub()); + printf("prog.cpp: %s\n", boo_sub()); #endif } """) @@ -224,10 +224,10 @@ sub_build_nodes = [ os.path.join('bld', 'subsrcdir','boo' + _obj), build_nodes = ['fooprog' + _exe, dll_ + 'foo' + _dll, - 'foo' + _obj, + 'foo' + _obj, 'barprog' + _exe, - dll_ + 'bar' + _dll, - 'bar' + _obj, + dll_ + 'bar' + _dll, + 'bar' + _obj, 'gooprog' + _exe, diff --git a/test/Object.py b/test/Object.py index 9ed7a15..8b9c5e0 100644 --- a/test/Object.py +++ b/test/Object.py @@ -49,7 +49,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c\n"); + printf("f1.c\n"); } """) @@ -59,7 +59,7 @@ test.write('f2.cpp', r""" void f2(void) { - printf("f2.c\n"); + printf("f2.c\n"); } """) @@ -67,7 +67,7 @@ test.write('f3.c', r""" void f3(void) { - printf("f3.c\n"); + printf("f3.c\n"); } """) @@ -75,7 +75,7 @@ test.write('f4.c', r""" void f4(void) { - printf("f4.c\n"); + printf("f4.c\n"); } """) @@ -83,7 +83,7 @@ test.write('f5.c', r""" void f5(void) { - printf("f5.c\n"); + printf("f5.c\n"); } """) @@ -96,12 +96,12 @@ extern "C" void f3(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f1(); - f2(); - f3(); - printf("prog.c\n"); - return 0; + argv[argc++] = "--"; + f1(); + f2(); + f3(); + printf("prog.c\n"); + return 0; } """) diff --git a/test/Perforce/Perforce.py b/test/Perforce/Perforce.py index d273cbb..04127f5 100644 --- a/test/Perforce/Perforce.py +++ b/test/Perforce/Perforce.py @@ -67,7 +67,7 @@ class TestPerforce(TestSCons.TestSCons): # We don't use self.run() because the TestCmd logic will hang # waiting for the daemon to exit, even when we pass it - # the -d option. + # the -d option. try: spawnv = os.spawnv except AttributeError: @@ -99,15 +99,15 @@ class TestPerforce(TestSCons.TestSCons): def substitute(self, s, **kw): kw = kw.copy() - kw.update(self.__dict__) + kw.update(self.__dict__) return s % kw def cleanup(self, condition = None): if self.p4d: self.p4('admin stop') - self.p4d = None + self.p4d = None - if TestSCons: + if TestSCons: TestSCons.TestSCons.cleanup(self, condition) test = TestPerforce() diff --git a/test/PharLap.py b/test/PharLap.py index 0455cc2..5612008 100644 --- a/test/PharLap.py +++ b/test/PharLap.py @@ -46,8 +46,8 @@ if not test.detect_tool('386asm'): test.write("minasm.asm", r""" ; ; MINASM.ASM - A minimal assembly language program which runs -; under ToolSuite. You can use this program as a framework -; for large assembly language programs. +; under ToolSuite. You can use this program as a framework +; for large assembly language programs. ; .386 @@ -110,7 +110,7 @@ _CONST ends CGROUP group _TEXT, _CONST DGROUP group _DATA, _bss - assume cs:CGROUP,ds:DGROUP + assume cs:CGROUP,ds:DGROUP _TEXT segment ; @@ -122,22 +122,22 @@ _TEXT segment ; modify the loop count in memory verifies that it actually ends ; up in RAM. ; - public _main + public _main _main proc near - mov cl,0ah ; Skip a line before we start - call PutCharTarget ; + mov cl,0ah ; Skip a line before we start + call PutCharTarget ; main_loop: - cmp loopcount,0 ; Are we at the end of our loop? - je short done_main ; yes. - lea edx,rommessage ; EDX -> ROM message - call WriteStringTarget ; Display it - lea edx,rammessage ; EDX -> RAM message - call WriteStringTarget ; Display it - dec loopcount ; - jmp main_loop ; Branch back for next loop iteration + cmp loopcount,0 ; Are we at the end of our loop? + je short done_main ; yes. + lea edx,rommessage ; EDX -> ROM message + call WriteStringTarget ; Display it + lea edx,rammessage ; EDX -> RAM message + call WriteStringTarget ; Display it + dec loopcount ; + jmp main_loop ; Branch back for next loop iteration done_main: - ret ; That's it! + ret ; That's it! _main endp @@ -145,27 +145,27 @@ _main endp ; WriteStringTarget - Display a string on the target console ; ; Inputs: -; EDX -> Null terminated ASCII string to display +; EDX -> Null terminated ASCII string to display ; ; Outputs: -; All registers preserved +; All registers preserved ; WriteStringTarget proc near - push ecx ; Save registers - push edx ; + push ecx ; Save registers + push edx ; write_loop: - movzx ecx,byte ptr [edx] ; Get a character - jecxz done_str ; Branch if end of string - call PutCharTarget ; Display this character - inc edx ; Bump scan pointer - jmp write_loop ; And loop back for next character + movzx ecx,byte ptr [edx] ; Get a character + jecxz done_str ; Branch if end of string + call PutCharTarget ; Display this character + inc edx ; Bump scan pointer + jmp write_loop ; And loop back for next character done_str: - pop edx ; Restore registers - pop ecx ; - ret ; and return + pop edx ; Restore registers + pop ecx ; + ret ; and return WriteStringTarget endp @@ -176,26 +176,26 @@ WriteStringTarget endp ; the PutChar kernel service available through int 254. ; ; Inputs: -; CL = character to display +; CL = character to display ; ; Outputs: -; All registers preserved +; All registers preserved ; PutCharTarget proc near - push eax ; Save registers - push ebx ; - push edx ; + push eax ; Save registers + push ebx ; + push edx ; - mov ax,254Ah ; Request Kernel Service - mov bx,1 ; service code 1 = PutChar - movzx edx,cl ; EDX = character to display - int 0FEh ; Int 254 is for kernel services + mov ax,254Ah ; Request Kernel Service + mov bx,1 ; service code 1 = PutChar + movzx edx,cl ; EDX = character to display + int 0FEh ; Int 254 is for kernel services - pop edx ; Restore registers - pop ebx ; - pop eax ; - ret ; and return + pop edx ; Restore registers + pop ebx ; + pop eax ; + ret ; and return PutCharTarget endp @@ -226,54 +226,54 @@ extrn __p_SEG__bss_END:dword ; public __p_start __p_start proc near - pushad ; save initial regs - push es ; - call __pl_unpackrom ; Call the unpacker - cld ; Clear direction flag - - lea eax,__p_SEG__bss_END ; load end address and - lea ebx,__p_SEG__bss_BEGIN ; subtract start to get size - sub eax,ebx - mov ecx,eax ; This is size - inc ecx - lea edi,__p_SEG__bss_BEGIN ; Zero from start address - mov al,0 ;Zero out BSS and C_COMMON - rep stosb - - pop es ; restore initial regs - popad - call _main ; go do some work + pushad ; save initial regs + push es ; + call __pl_unpackrom ; Call the unpacker + cld ; Clear direction flag + + lea eax,__p_SEG__bss_END ; load end address and + lea ebx,__p_SEG__bss_BEGIN ; subtract start to get size + sub eax,ebx + mov ecx,eax ; This is size + inc ecx + lea edi,__p_SEG__bss_BEGIN ; Zero from start address + mov al,0 ;Zero out BSS and C_COMMON + rep stosb + + pop es ; restore initial regs + popad + call _main ; go do some work stopme: xor eax,eax ; Call _EtsExitProcess(0) - push eax ; - call _EtsExitProcess ; - pop eax ; - jmp stopme ; .. in a loop just in case it ever - ; comes back + push eax ; + call _EtsExitProcess ; + pop eax ; + jmp stopme ; .. in a loop just in case it ever + ; comes back __p_start endp TD_hack: - mov eax, __p_tdhack ; force reference to TD-hack symbol + mov eax, __p_tdhack ; force reference to TD-hack symbol _TEXT ends ; -; Hack for Turbo Debugger/TDEMB - TD will fault if the .exe being -; debugged doesn't have an import table. (TD looks for the address of -; the table, then dereferences that address wihtout checking for NULL). +; Hack for Turbo Debugger/TDEMB - TD will fault if the .exe being +; debugged doesn't have an import table. (TD looks for the address of +; the table, then dereferences that address wihtout checking for NULL). ; -; This symbol, __p_tdhack, must be declared as an import in all the -; .emb files shipped. IE: +; This symbol, __p_tdhack, must be declared as an import in all the +; .emb files shipped. IE: ; -; -implib embkern.lib -; -import __p_tdhack +; -implib embkern.lib +; -import __p_tdhack ; -; This forces the creation of an import table within the .EXE. +; This forces the creation of an import table within the .EXE. _DATA segment extrn __p_tdhack:dword _DATA ends - end __p_start + end __p_start """) test.write("foo.lnk",""" diff --git a/test/Program.py b/test/Program.py index 007a35b..5b785a3 100644 --- a/test/Program.py +++ b/test/Program.py @@ -55,9 +55,9 @@ test.write('f1.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) @@ -65,7 +65,7 @@ test.write('f2a.c', r""" void f2a(void) { - printf("f2a.c\n"); + printf("f2a.c\n"); } """) @@ -73,7 +73,7 @@ test.write('f2b.c', r""" void f2b(void) { - printf("f2b.c\n"); + printf("f2b.c\n"); } """) @@ -83,11 +83,11 @@ extern void f2b(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f2a(); - f2b(); - printf("f2c.c\n"); - exit (0); + argv[argc++] = "--"; + f2a(); + f2b(); + printf("f2c.c\n"); + exit (0); } """) @@ -95,7 +95,7 @@ test.write('f3a.c', r""" void f3a(void) { - printf("f3a.c\n"); + printf("f3a.c\n"); } """) @@ -103,7 +103,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c\n"); + printf("f3b.c\n"); } """) @@ -113,11 +113,11 @@ extern void f3b(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f3a(); - f3b(); - printf("f3c.c\n"); - exit (0); + argv[argc++] = "--"; + f3a(); + f3b(); + printf("f3c.c\n"); + exit (0); } """) @@ -125,9 +125,9 @@ test.write('f4.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f4.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f4.c\n"); + exit (0); } """) @@ -135,9 +135,9 @@ test.write('foo5.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo5.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo5.c\n"); + exit (0); } """) @@ -155,9 +155,9 @@ test.write('f1.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c X\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c X\n"); + exit (0); } """) @@ -165,7 +165,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c X\n"); + printf("f3b.c X\n"); } """) @@ -173,9 +173,9 @@ test.write('f4.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f4.c X\n"); - exit (0); + argv[argc++] = "--"; + printf("f4.c X\n"); + exit (0); } """) @@ -183,9 +183,9 @@ test.write('foo5.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo5.c X\n"); - exit (0); + argv[argc++] = "--"; + printf("foo5.c X\n"); + exit (0); } """) @@ -220,9 +220,9 @@ test.write('f1.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c Y\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c Y\n"); + exit (0); } """) @@ -230,7 +230,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c Y\n"); + printf("f3b.c Y\n"); } """) @@ -238,9 +238,9 @@ test.write('f4.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f4.c Y\n"); - exit (0); + argv[argc++] = "--"; + printf("f4.c Y\n"); + exit (0); } """) @@ -248,9 +248,9 @@ test.write('foo5.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo5.c Y\n"); - exit (0); + argv[argc++] = "--"; + printf("foo5.c Y\n"); + exit (0); } """) @@ -268,9 +268,9 @@ test.write('f1.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c Z\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c Z\n"); + exit (0); } """) @@ -278,7 +278,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c Z\n"); + printf("f3b.c Z\n"); } """) @@ -286,9 +286,9 @@ test.write('f4.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f4.c Z\n"); - exit (0); + argv[argc++] = "--"; + printf("f4.c Z\n"); + exit (0); } """) @@ -296,9 +296,9 @@ test.write('foo5.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo5.c Z\n"); - exit (0); + argv[argc++] = "--"; + printf("foo5.c Z\n"); + exit (0); } """) diff --git a/test/RANLIB.py b/test/RANLIB.py index 05edf88..5002b20 100644 --- a/test/RANLIB.py +++ b/test/RANLIB.py @@ -67,7 +67,7 @@ test.write('foo.c', r""" void library_function(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -75,7 +75,7 @@ test.write('bar.c', r""" void library_function(void) { - printf("bar.c\n"); + printf("bar.c\n"); } """) @@ -83,9 +83,9 @@ test.write('main.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - library_function(); - exit (0); + argv[argc++] = "--"; + library_function(); + exit (0); } """) diff --git a/test/RANLIBFLAGS.py b/test/RANLIBFLAGS.py index 377536c..80618ba 100644 --- a/test/RANLIBFLAGS.py +++ b/test/RANLIBFLAGS.py @@ -64,7 +64,7 @@ test.write('foo.c', r""" void library_function(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) @@ -72,7 +72,7 @@ test.write('bar.c', r""" void library_function(void) { - printf("bar.c\n"); + printf("bar.c\n"); } """) @@ -80,9 +80,9 @@ test.write('main.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - library_function(); - exit (0); + argv[argc++] = "--"; + library_function(); + exit (0); } """) diff --git a/test/Repository/CPPPATH.py b/test/Repository/CPPPATH.py index 9638375..6ec21f3 100644 --- a/test/Repository/CPPPATH.py +++ b/test/Repository/CPPPATH.py @@ -37,7 +37,7 @@ test = TestSCons.TestSCons() test.subdir('repository', ['repository', 'include1'], ['repository', 'include2'], - 'work') + 'work') work_foo = test.workpath('work', 'foo') @@ -45,11 +45,11 @@ opts = '-Y ' + test.workpath('repository') # test.write(['repository', 'include1', 'foo.h'], r""" -#define STRING "repository/include1/foo.h" +#define STRING "repository/include1/foo.h" """) test.write(['repository', 'include2', 'foo.h'], r""" -#define STRING "repository/include2/foo.h" +#define STRING "repository/include2/foo.h" """) test.write(['repository', 'foo.c'], r""" @@ -57,9 +57,9 @@ test.write(['repository', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING); + exit (0); } """) diff --git a/test/Repository/LIBPATH.py b/test/Repository/LIBPATH.py index 8f0a12f..c4470d2 100644 --- a/test/Repository/LIBPATH.py +++ b/test/Repository/LIBPATH.py @@ -65,9 +65,9 @@ test.write(['work', 'aaa.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("work/aaa.c\n"); - exit (0); + argv[argc++] = "--"; + printf("work/aaa.c\n"); + exit (0); } """) @@ -75,9 +75,9 @@ test.write(['work', 'bbb.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("work/bbb.c\n"); - exit (0); + argv[argc++] = "--"; + printf("work/bbb.c\n"); + exit (0); } """) diff --git a/test/Repository/Program.py b/test/Repository/Program.py index 6f06975..93bcb85 100644 --- a/test/Repository/Program.py +++ b/test/Repository/Program.py @@ -54,7 +54,7 @@ test.write(['repository', 'aaa.c'], r""" void aaa(void) { - printf("repository/aaa.c\n"); + printf("repository/aaa.c\n"); } """) @@ -62,7 +62,7 @@ test.write(['repository', 'bbb.c'], r""" void bbb(void) { - printf("repository/bbb.c\n"); + printf("repository/bbb.c\n"); } """) @@ -72,11 +72,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository/foo.c\n"); + exit (0); } """) @@ -98,7 +98,7 @@ test.write(['work1', 'bbb.c'], r""" void bbb(void) { - printf("work1/bbb.c\n"); + printf("work1/bbb.c\n"); } """) @@ -116,7 +116,7 @@ test.write(['work1', 'aaa.c'], r""" void aaa(void) { - printf("work1/aaa.c\n"); + printf("work1/aaa.c\n"); } """) @@ -126,11 +126,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("work1/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("work1/foo.c\n"); + exit (0); } """) @@ -188,7 +188,7 @@ test.write(['repository.old', 'aaa.c'], r""" void aaa(void) { - printf("repository.old/aaa.c\n"); + printf("repository.old/aaa.c\n"); } """) @@ -196,7 +196,7 @@ test.write(['repository.old', 'bbb.c'], r""" void bbb(void) { - printf("repository.old/bbb.c\n"); + printf("repository.old/bbb.c\n"); } """) @@ -206,11 +206,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository.old/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository.old/foo.c\n"); + exit (0); } """) @@ -235,7 +235,7 @@ test.write(['repository.new', 'aaa.c'], r""" void aaa(void) { - printf("repository.new/aaa.c\n"); + printf("repository.new/aaa.c\n"); } """) @@ -243,7 +243,7 @@ test.write(['work2', 'bbb.c'], r""" void bbb(void) { - printf("work2/bbb.c\n"); + printf("work2/bbb.c\n"); } """) @@ -264,7 +264,7 @@ test.write(['work2', 'aaa.c'], r""" void aaa(void) { - printf("work2/aaa.c\n"); + printf("work2/aaa.c\n"); } """) @@ -274,11 +274,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("work2/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("work2/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/StaticLibrary.py b/test/Repository/StaticLibrary.py index f104448..087fa7e 100644 --- a/test/Repository/StaticLibrary.py +++ b/test/Repository/StaticLibrary.py @@ -69,7 +69,7 @@ test.write(['repository', 'aaa.c'], r""" void aaa(void) { - printf("repository/aaa.c\n"); + printf("repository/aaa.c\n"); } """) @@ -77,7 +77,7 @@ test.write(['repository', 'bbb.c'], r""" void bbb(void) { - printf("repository/bbb.c\n"); + printf("repository/bbb.c\n"); } """) @@ -87,11 +87,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository/foo.c\n"); + exit (0); } """) @@ -121,7 +121,7 @@ test.write(['work1', 'bbb.c'], r""" void bbb(void) { - printf("work1/bbb.c\n"); + printf("work1/bbb.c\n"); } """) @@ -171,7 +171,7 @@ test.write(['work2', 'bbb.c'], r""" void bbb(void) { - printf("work2/bbb.c\n"); + printf("work2/bbb.c\n"); } """) @@ -199,11 +199,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("work3/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("work3/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/absolute-path.py b/test/Repository/absolute-path.py index ecbe444..ed360c7 100644 --- a/test/Repository/absolute-path.py +++ b/test/Repository/absolute-path.py @@ -38,7 +38,7 @@ test = TestSCons.TestSCons() test.subdir('repository', ['repository', 'src'], 'subdir', - 'work') + 'work') src_SConscript = os.path.join('src', 'SConscript') subdir_aaa_c = test.workpath('subdir', 'aaa.c') @@ -60,7 +60,7 @@ test.write(['repository', 'src', 'aaa.c'], r""" void src_aaa(void) { - printf("repository/src/aaa.c\n"); + printf("repository/src/aaa.c\n"); } """) @@ -68,7 +68,7 @@ test.write(['subdir', 'aaa.c'], r""" void subdir_aaa(void) { - printf("subdir/aaa.c\n"); + printf("subdir/aaa.c\n"); } """) @@ -78,11 +78,11 @@ extern void subdir_aaa(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - src_aaa(); - subdir_aaa(); - printf("repository/src/foo.c\n"); - exit (0); + argv[argc++] = "--"; + src_aaa(); + subdir_aaa(); + printf("repository/src/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/include.py b/test/Repository/include.py index e555e9e..577442a 100644 --- a/test/Repository/include.py +++ b/test/Repository/include.py @@ -47,12 +47,12 @@ env.Program(target = 'foo', source = 'foo.c') """ % repository) test.write(['repository', 'foo.h'], r""" -#define STRING1 "repository/foo.h" +#define STRING1 "repository/foo.h" #include """) test.write(['repository', 'bar.h'], r""" -#define STRING2 "repository/bar.h" +#define STRING2 "repository/bar.h" """) test.write(['repository', 'foo.c'], r""" @@ -60,11 +60,11 @@ test.write(['repository', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING1); - printf("%s\n", STRING2); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING1); + printf("%s\n", STRING2); + printf("repository/foo.c\n"); + exit (0); } """) @@ -84,7 +84,7 @@ test.up_to_date(chdir = 'work', arguments = '.') # test.write(['work', 'foo.h'], r""" -#define STRING1 "work/foo.h" +#define STRING1 "work/foo.h" #include """) @@ -104,11 +104,11 @@ test.write(['work', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING1); - printf("%s\n", STRING2); - printf("work/foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING1); + printf("%s\n", STRING2); + printf("work/foo.c\n"); + exit (0); } """) @@ -124,7 +124,7 @@ test.up_to_date(chdir = 'work', arguments = '.') # test.write(['work', 'bar.h'], r""" -#define STRING2 "work/bar.h" +#define STRING2 "work/bar.h" """) test.run(chdir = 'work', arguments = '.') diff --git a/test/Repository/link-object.py b/test/Repository/link-object.py index 503363e..63c274e 100644 --- a/test/Repository/link-object.py +++ b/test/Repository/link-object.py @@ -55,7 +55,7 @@ test.write(['repository', 'aaa.c'], r""" void aaa(void) { - printf("repository/aaa.c\n"); + printf("repository/aaa.c\n"); } """) @@ -63,7 +63,7 @@ test.write(['repository', 'bbb.c'], r""" void bbb(void) { - printf("repository/bbb.c\n"); + printf("repository/bbb.c\n"); } """) @@ -73,11 +73,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository/foo.c\n"); + exit (0); } """) @@ -110,7 +110,7 @@ test.write(['work', 'bbb.c'], r""" void bbb(void) { - printf("work/bbb.c\n"); + printf("work/bbb.c\n"); } """) diff --git a/test/Repository/multi-dir.py b/test/Repository/multi-dir.py index 777baf8..4532cc3 100644 --- a/test/Repository/multi-dir.py +++ b/test/Repository/multi-dir.py @@ -64,12 +64,12 @@ env.Program(target = 'xxx', source = 'main.c') """) test.write(['repository', 'include', 'my_string.h'], r""" -#define MY_STRING "repository/include/my_string.h" +#define MY_STRING "repository/include/my_string.h" """) test.write(['repository', 'src', 'include.h'], r""" #include -#define LOCAL_STRING "repository/src/include.h" +#define LOCAL_STRING "repository/src/include.h" """) test.write(['repository', 'src', 'main.c'], r""" @@ -77,11 +77,11 @@ test.write(['repository', 'src', 'main.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", MY_STRING); - printf("%s\n", LOCAL_STRING); - printf("repository/src/main.c\n"); - exit (0); + argv[argc++] = "--"; + printf("%s\n", MY_STRING); + printf("%s\n", LOCAL_STRING); + printf("repository/src/main.c\n"); + exit (0); } """) @@ -99,7 +99,7 @@ repository/src/main.c # test.write(['work', 'include', 'my_string.h'], r""" -#define MY_STRING "work/include/my_string.h" +#define MY_STRING "work/include/my_string.h" """) test.run(chdir = 'work', options = opts, arguments = ".") @@ -112,7 +112,7 @@ repository/src/main.c test.write(['work', 'src', 'include.h'], r""" #include -#define LOCAL_STRING "work/src/include.h" +#define LOCAL_STRING "work/src/include.h" """) test.run(chdir = 'work', options = opts, arguments = ".") diff --git a/test/Repository/no-repository.py b/test/Repository/no-repository.py index db8431d..6dc9add 100644 --- a/test/Repository/no-repository.py +++ b/test/Repository/no-repository.py @@ -53,7 +53,7 @@ test.write(['work', 'aaa.c'], r""" void aaa(void) { - printf("work/aaa.c\n"); + printf("work/aaa.c\n"); } """) @@ -61,7 +61,7 @@ test.write(['work', 'bbb.c'], r""" void bbb(void) { - printf("work/bbb.c\n"); + printf("work/bbb.c\n"); } """) @@ -71,11 +71,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("work/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("work/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/signature-order.py b/test/Repository/signature-order.py index 2329569..8069b60 100644 --- a/test/Repository/signature-order.py +++ b/test/Repository/signature-order.py @@ -50,11 +50,11 @@ env.Program(target = 'foo', source = 'foo.c') """ % repository) foo_h_contents = """\ -#define STRING1 "foo.h" +#define STRING1 "foo.h" """ bar_h_contents = """\ -#define STRING2 "bar.h" +#define STRING2 "bar.h" """ test.write(['repository', 'foo.h'], foo_h_contents) @@ -67,11 +67,11 @@ test.write(['repository', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING1); - printf("%s\n", STRING2); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING1); + printf("%s\n", STRING2); + printf("repository/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/top-level-path.py b/test/Repository/top-level-path.py index 00c056c..2d4164a 100644 --- a/test/Repository/top-level-path.py +++ b/test/Repository/top-level-path.py @@ -38,7 +38,7 @@ test = TestSCons.TestSCons() test.subdir('repository', ['repository', 'src'], ['repository', 'subdir'], - 'work') + 'work') src_SConscript = os.path.join('src', 'SConscript') work_src_foo = test.workpath('work', 'src', 'foo' + _exe) @@ -59,7 +59,7 @@ test.write(['repository', 'src', 'aaa.c'], r""" void src_aaa(void) { - printf("repository/src/aaa.c\n"); + printf("repository/src/aaa.c\n"); } """) @@ -67,7 +67,7 @@ test.write(['repository', 'subdir', 'aaa.c'], r""" void subdir_aaa(void) { - printf("repository/subdir/aaa.c\n"); + printf("repository/subdir/aaa.c\n"); } """) @@ -77,11 +77,11 @@ extern void subdir_aaa(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - src_aaa(); - subdir_aaa(); - printf("repository/src/foo.c\n"); - exit (0); + argv[argc++] = "--"; + src_aaa(); + subdir_aaa(); + printf("repository/src/foo.c\n"); + exit (0); } """) diff --git a/test/Repository/variants.py b/test/Repository/variants.py index a0cc2af..f855636 100644 --- a/test/Repository/variants.py +++ b/test/Repository/variants.py @@ -44,7 +44,7 @@ test.subdir('repository', ['repository', 'src2', 'include'], ['repository', 'src2', 'xxx'], ['repository', 'build2'], - ['repository', 'build2', 'foo'], + ['repository', 'build2', 'foo'], ['repository', 'build2', 'bar'], 'work1', ['work1', 'src1'], @@ -124,11 +124,11 @@ env2.Program('xxx', ['main.c']) """) test.write(['repository', 'src1', 'iii.h'], r""" -#ifdef FOO -#define STRING "REPOSITORY_FOO" +#ifdef FOO +#define STRING "REPOSITORY_FOO" #endif -#ifdef BAR -#define STRING "REPOSITORY_BAR" +#ifdef BAR +#define STRING "REPOSITORY_BAR" #endif """) @@ -137,7 +137,7 @@ test.write(['repository', 'src1', 'aaa.c'], r""" void aaa(void) { - printf("repository/src1/aaa.c: %s\n", STRING); + printf("repository/src1/aaa.c: %s\n", STRING); } """) @@ -146,7 +146,7 @@ test.write(['repository', 'src1', 'bbb.c'], r""" void bbb(void) { - printf("repository/src1/bbb.c: %s\n", STRING); + printf("repository/src1/bbb.c: %s\n", STRING); } """) @@ -157,51 +157,51 @@ extern void bbb(void); int main(int argc, char *argv[]) { -#ifdef BAR - printf("Only when -DBAR.\n"); +#ifdef BAR + printf("Only when -DBAR.\n"); #endif - aaa(); - bbb(); - printf("repository/src1/main.c: %s\n", STRING); - exit (0); + aaa(); + bbb(); + printf("repository/src1/main.c: %s\n", STRING); + exit (0); } """) test.write(['repository', 'src2', 'include', 'my_string.h'], r""" -#ifdef FOO -#define INCLUDE_OS "FOO" +#ifdef FOO +#define INCLUDE_OS "FOO" #endif -#ifdef BAR -#define INCLUDE_OS "BAR" +#ifdef BAR +#define INCLUDE_OS "BAR" #endif -#define INCLUDE_STRING "repository/src2/include/my_string.h: %s\n" +#define INCLUDE_STRING "repository/src2/include/my_string.h: %s\n" """) test.write(['repository', 'src2', 'xxx', 'include.h'], r""" #include -#ifdef FOO -#define XXX_OS "FOO" +#ifdef FOO +#define XXX_OS "FOO" #endif -#ifdef BAR -#define XXX_OS "BAR" +#ifdef BAR +#define XXX_OS "BAR" #endif -#define XXX_STRING "repository/src2/xxx/include.h: %s\n" +#define XXX_STRING "repository/src2/xxx/include.h: %s\n" """) test.write(['repository', 'src2', 'xxx', 'main.c'], r""" #include -#ifdef FOO -#define MAIN_OS "FOO" +#ifdef FOO +#define MAIN_OS "FOO" #endif -#ifdef BAR -#define MAIN_OS "BAR" +#ifdef BAR +#define MAIN_OS "BAR" #endif main() { - printf(INCLUDE_STRING, INCLUDE_OS); - printf(XXX_STRING, XXX_OS); - printf("repository/src2/xxx/main.c: %s\n", MAIN_OS); - exit (0); + printf(INCLUDE_STRING, INCLUDE_OS); + printf(XXX_STRING, XXX_OS); + printf("repository/src2/xxx/main.c: %s\n", MAIN_OS); + exit (0); } """) @@ -270,11 +270,11 @@ test.up_to_date(chdir = 'work1', options = opts + " OS=bar", arguments = 'build1 time.sleep(2) test.write(['work1', 'src1', 'iii.h'], r""" -#ifdef FOO -#define STRING "WORK_FOO" +#ifdef FOO +#define STRING "WORK_FOO" #endif -#ifdef BAR -#define STRING "WORK_BAR" +#ifdef BAR +#define STRING "WORK_BAR" #endif """) @@ -327,13 +327,13 @@ test.fail_test(os.path.exists(test.workpath('work2', 'build2', 'bar', 'src2', 'x time.sleep(2) test.write(['work2', 'src2', 'include', 'my_string.h'], r""" -#ifdef FOO -#define INCLUDE_OS "FOO" +#ifdef FOO +#define INCLUDE_OS "FOO" #endif -#ifdef BAR -#define INCLUDE_OS "BAR" +#ifdef BAR +#define INCLUDE_OS "BAR" #endif -#define INCLUDE_STRING "work2/src2/include/my_string.h: %s\n" +#define INCLUDE_STRING "work2/src2/include/my_string.h: %s\n" """) # @@ -361,13 +361,13 @@ time.sleep(2) test.write(['work2', 'src2', 'xxx', 'include.h'], r""" #include -#ifdef FOO -#define XXX_OS "FOO" +#ifdef FOO +#define XXX_OS "FOO" #endif -#ifdef BAR -#define XXX_OS "BAR" +#ifdef BAR +#define XXX_OS "BAR" #endif -#define XXX_STRING "work2/src2/xxx/include.h: %s\n" +#define XXX_STRING "work2/src2/xxx/include.h: %s\n" """) test.run(chdir = 'work2', options = opts, arguments = 'build2') diff --git a/test/Repository/within-repository.py b/test/Repository/within-repository.py index dc16d62..1cffe81 100644 --- a/test/Repository/within-repository.py +++ b/test/Repository/within-repository.py @@ -56,7 +56,7 @@ test.write(['repository', 'aaa.c'], r""" void aaa(void) { - printf("repository/aaa.c\n"); + printf("repository/aaa.c\n"); } """) @@ -64,7 +64,7 @@ test.write(['repository', 'bbb.c'], r""" void bbb(void) { - printf("repository/bbb.c\n"); + printf("repository/bbb.c\n"); } """) @@ -74,11 +74,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository/foo.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository/foo.c\n"); + exit (0); } """) @@ -91,7 +91,7 @@ test.write(['repository', 'src', 'aaa.c'], r""" void aaa(void) { - printf("repository/src/aaa.c\n"); + printf("repository/src/aaa.c\n"); } """) @@ -99,7 +99,7 @@ test.write(['repository', 'src', 'bbb.c'], r""" void bbb(void) { - printf("repository/src/bbb.c\n"); + printf("repository/src/bbb.c\n"); } """) @@ -109,11 +109,11 @@ extern void bbb(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - aaa(); - bbb(); - printf("repository/src/bar.c\n"); - exit (0); + argv[argc++] = "--"; + aaa(); + bbb(); + printf("repository/src/bar.c\n"); + exit (0); } """) diff --git a/test/SHLIBPREFIX.py b/test/SHLIBPREFIX.py index 25bca5f..352f217 100644 --- a/test/SHLIBPREFIX.py +++ b/test/SHLIBPREFIX.py @@ -41,7 +41,7 @@ test.write('foo.c', r""" void foo(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) diff --git a/test/SHLIBSUFFIX.py b/test/SHLIBSUFFIX.py index aeea958..94c2984 100644 --- a/test/SHLIBSUFFIX.py +++ b/test/SHLIBSUFFIX.py @@ -41,7 +41,7 @@ test.write('foo.c', r""" void foo(void) { - printf("foo.c\n"); + printf("foo.c\n"); } """) diff --git a/test/SWIG/SWIG.py b/test/SWIG/SWIG.py index 21a6a18..753d0b9 100644 --- a/test/SWIG/SWIG.py +++ b/test/SWIG/SWIG.py @@ -63,7 +63,7 @@ infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): if l[:4] != 'swig': - outfile.write(l) + outfile.write(l) sys.exit(0) """) @@ -77,9 +77,9 @@ env.Copy(SWIGFLAGS = '-c++').Program(target = 'test3', source = 'test3.i') test.write('test1.i', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("test1.i\n"); - exit (0); + argv[argc++] = "--"; + printf("test1.i\n"); + exit (0); } swig """) @@ -93,9 +93,9 @@ test.write('test3.i', r""" #include int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("test3.i\n"); - exit (0); + argv[argc++] = "--"; + printf("test3.i\n"); + exit (0); } swig """) diff --git a/test/SharedLibrary.py b/test/SharedLibrary.py index 185cf9f..72f8770 100644 --- a/test/SharedLibrary.py +++ b/test/SharedLibrary.py @@ -68,7 +68,7 @@ test.write('foo.c', r""" void f1(void) { - printf("foo.c\n"); + printf("foo.c\n"); fflush(stdout); } """) @@ -80,7 +80,7 @@ test.write('f1.c', r""" void f1(void) { - printf("f1.c\n"); + printf("f1.c\n"); fflush(stdout); } """) @@ -97,7 +97,7 @@ test.write('f2a.c', r""" void f2a(void) { - printf("f2a.c\n"); + printf("f2a.c\n"); } """) @@ -105,7 +105,7 @@ test.write('f2b.c', r""" void f2b(void) { - printf("f2b.c\n"); + printf("f2b.c\n"); } """) @@ -115,7 +115,7 @@ test.write('f2c.c', r""" void f2c(void) { - printf("f2c.c\n"); + printf("f2c.c\n"); fflush(stdout); } """) @@ -134,7 +134,7 @@ test.write('f3a.c', r""" void f3a(void) { - printf("f3a.c\n"); + printf("f3a.c\n"); } """) @@ -142,7 +142,7 @@ test.write('f3b.c', r""" void f3b(void) { - printf("f3b.c\n"); + printf("f3b.c\n"); } """) @@ -152,7 +152,7 @@ test.write('f3c.c', r""" void f3c(void) { - printf("f3c.c\n"); + printf("f3c.c\n"); fflush(stdout); } """) @@ -178,15 +178,15 @@ void f3c(void); int main(int argc, char *argv[]) { - argv[argc++] = "--"; - f1(); - f2a(); - f2b(); - f2c(); - f3a(); - f3b(); - f3c(); - printf("prog.c\n"); + argv[argc++] = "--"; + f1(); + f2a(); + f2b(); + f2c(); + f3a(); + f3b(); + f3c(); + printf("prog.c\n"); return 0; } """) diff --git a/test/TAR/TAR.py b/test/TAR/TAR.py index abd86ba..9d5a617 100644 --- a/test/TAR/TAR.py +++ b/test/TAR/TAR.py @@ -49,7 +49,7 @@ def process(outfile, name): list = os.listdir(name) list.sort() for entry in list: - process(outfile, os.path.join(name, entry)) + process(outfile, os.path.join(name, entry)) else: outfile.write(open(name, 'rb').read()) outfile = open(out, 'wb') diff --git a/test/TAR/TARFLAGS.py b/test/TAR/TARFLAGS.py index fcf7394..2cda502 100644 --- a/test/TAR/TARFLAGS.py +++ b/test/TAR/TARFLAGS.py @@ -52,7 +52,7 @@ def process(outfile, name): entries = os.listdir(name) entries.sort() for entry in entries: - process(outfile, os.path.join(name, entry)) + process(outfile, os.path.join(name, entry)) else: outfile.write(open(name, 'rb').read()) outfile = open(out, 'wb') @@ -104,7 +104,7 @@ os.system(string.join(sys.argv[1:], " ")) foo = Environment() tar = foo['TAR'] bar = Environment(TAR = '', - TARFLAGS = r'%s wrapper.py ' + tar + ' -c -b 1') + TARFLAGS = r'%s wrapper.py ' + tar + ' -c -b 1') foo.Tar(target = 'foo.tar', source = ['file10', 'file11']) foo.Tar(target = 'foo.tar', source = 'file12') bar.Tar(target = 'bar.tar', source = ['file13', 'file14']) diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 4ed080f..4f19bc1 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -44,7 +44,7 @@ infile = open(sys.argv[1], 'rb') out_file = open(base_name+'.dvi', 'wb') for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/LATEXFLAGS.py b/test/TEX/LATEXFLAGS.py index badf85e..fa2348f 100644 --- a/test/TEX/LATEXFLAGS.py +++ b/test/TEX/LATEXFLAGS.py @@ -50,7 +50,7 @@ out_file = open(base_name+'.dvi', 'wb') out_file.write(opt_string + "\n") for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/PDFLATEX.py b/test/TEX/PDFLATEX.py index 4c6f84d..5dcfd0b 100644 --- a/test/TEX/PDFLATEX.py +++ b/test/TEX/PDFLATEX.py @@ -44,7 +44,7 @@ infile = open(sys.argv[1], 'rb') out_file = open(base_name+'.pdf', 'wb') for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/PDFLATEXFLAGS.py b/test/TEX/PDFLATEXFLAGS.py index 880d6d0..0b6a9fc 100644 --- a/test/TEX/PDFLATEXFLAGS.py +++ b/test/TEX/PDFLATEXFLAGS.py @@ -50,7 +50,7 @@ out_file = open(base_name+'.pdf', 'wb') out_file.write(opt_string + "\n") for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/PDFTEX.py b/test/TEX/PDFTEX.py index 2015c33..fa0d839 100644 --- a/test/TEX/PDFTEX.py +++ b/test/TEX/PDFTEX.py @@ -44,7 +44,7 @@ infile = open(sys.argv[1], 'rb') out_file = open(base_name+'.pdf', 'wb') for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/PDFTEXFLAGS.py b/test/TEX/PDFTEXFLAGS.py index fb1fbf0..1a0f8df 100644 --- a/test/TEX/PDFTEXFLAGS.py +++ b/test/TEX/PDFTEXFLAGS.py @@ -50,7 +50,7 @@ out_file = open(base_name+'.pdf', 'wb') out_file.write(opt_string + "\n") for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/TEX/TEX.py b/test/TEX/TEX.py index a2e69fa..a970822 100644 --- a/test/TEX/TEX.py +++ b/test/TEX/TEX.py @@ -44,7 +44,7 @@ infile = open(sys.argv[1], 'rb') out_file = open(base_name+'.dvi', 'wb') for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) @@ -129,10 +129,10 @@ Run \texttt{latex}, then \texttt{bibtex}, then \texttt{latex} twice again \cite{ bib = r""" @Book{lamport, - author = {L. Lamport}, - title = {{\LaTeX: A} Document Preparation System}, - publisher = {Addison-Wesley}, - year = 1994 + author = {L. Lamport}, + title = {{\LaTeX: A} Document Preparation System}, + publisher = {Addison-Wesley}, + year = 1994 } """ diff --git a/test/TEX/TEXFLAGS.py b/test/TEX/TEXFLAGS.py index fa5edb6..7bd602f 100644 --- a/test/TEX/TEXFLAGS.py +++ b/test/TEX/TEXFLAGS.py @@ -50,7 +50,7 @@ out_file = open(base_name+'.dvi', 'wb') out_file.write(opt_string + "\n") for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + out_file.write(l) sys.exit(0) """) diff --git a/test/WhereIs.py b/test/WhereIs.py index 15f4442..dccfefb 100644 --- a/test/WhereIs.py +++ b/test/WhereIs.py @@ -109,7 +109,7 @@ expect = [ test.workpath(sub3_xxx_exe), test.workpath(sub3_xxx_exe), test.workpath(sub4_xxx_exe), test.workpath(sub3_xxx_exe), - ] + ] test.run(arguments = ".", stdout = test.wrap_stdout(read_str = string.join(expect, "\n") + "\n", @@ -128,7 +128,7 @@ expect = [ test.workpath(sub4_xxx_exe), test.workpath(sub3_xxx_exe), test.workpath(sub4_xxx_exe), test.workpath(sub3_xxx_exe), - ] + ] test.run(arguments = ".", stdout = test.wrap_stdout(read_str = string.join(expect, "\n") + "\n", diff --git a/test/YACC/YACC.py b/test/YACC/YACC.py index 062e4bc..9be1934 100644 --- a/test/YACC/YACC.py +++ b/test/YACC/YACC.py @@ -73,10 +73,10 @@ test.write('aaa.y', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("YACC\n"); - printf("aaa.y\n"); - exit (0); + argv[argc++] = "--"; + printf("YACC\n"); + printf("aaa.y\n"); + exit (0); } """) @@ -84,10 +84,10 @@ test.write('bbb.yacc', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("YACC\n"); - printf("bbb.yacc\n"); - exit (0); + argv[argc++] = "--"; + printf("YACC\n"); + printf("bbb.yacc\n"); + exit (0); } """) @@ -146,7 +146,7 @@ yylex() } %%} %%%% -input: letter newline { printf("%s\n"); }; +input: letter newline { printf("%s\n"); }; letter: 'a' | 'b'; newline: '\n'; """ diff --git a/test/YACC/YACCFLAGS.py b/test/YACC/YACCFLAGS.py index 022b238..2779597 100644 --- a/test/YACC/YACCFLAGS.py +++ b/test/YACC/YACCFLAGS.py @@ -70,10 +70,10 @@ test.write('aaa.y', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("YACCFLAGS\n"); - printf("aaa.y\n"); - exit (0); + argv[argc++] = "--"; + printf("YACCFLAGS\n"); + printf("aaa.y\n"); + exit (0); } """) @@ -119,7 +119,7 @@ yylex() } %%} %%%% -input: letter newline { printf("%s\n"); }; +input: letter newline { printf("%s\n"); }; letter: 'a' | 'b'; newline: '\n'; """ diff --git a/test/ZIP/ZIP.py b/test/ZIP/ZIP.py index b2041e6..d92c0be 100644 --- a/test/ZIP/ZIP.py +++ b/test/ZIP/ZIP.py @@ -46,7 +46,7 @@ def process(outfile, name): list = os.listdir(name) list.sort() for entry in list: - process(outfile, os.path.join(name, entry)) + process(outfile, os.path.join(name, entry)) else: outfile.write(open(name, 'rb').read()) outfile = open(sys.argv[1], 'wb') diff --git a/test/build-errors.py b/test/build-errors.py index 67dac20..9b6443d 100644 --- a/test/build-errors.py +++ b/test/build-errors.py @@ -48,7 +48,7 @@ env.bld(target = 'f1', source = 'f1.in') """ % string.replace(no_such_file, '\\', '\\\\')) test.run(arguments='-f SConstruct1 .', - stdout = test.wrap_stdout("%s f1.in f1\n" % no_such_file, error=1), + stdout = test.wrap_stdout("%s f1.in f1\n" % no_such_file, error=1), stderr = None, status = 2) @@ -131,7 +131,7 @@ env.bld(target = 'f2', source = 'f2.in') """ % string.replace(not_executable, '\\', '\\\\')) test.run(arguments='-f SConstruct2 .', - stdout = test.wrap_stdout("%s f2.in f2\n" % not_executable, error=1), + stdout = test.wrap_stdout("%s f2.in f2\n" % not_executable, error=1), stderr = None, status = 2) @@ -163,7 +163,7 @@ env.bld(target = 'f3', source = 'f3.in') """ % string.replace(test.workdir, '\\', '\\\\')) test.run(arguments='-f SConstruct3 .', - stdout = test.wrap_stdout("%s f3.in f3\n" % test.workdir, error=1), + stdout = test.wrap_stdout("%s f3.in f3\n" % test.workdir, error=1), stderr = None, status = 2) diff --git a/test/errors.py b/test/errors.py index 571bffc..120ea3a 100644 --- a/test/errors.py +++ b/test/errors.py @@ -110,7 +110,7 @@ a ! x """) test.run(stdout = "scons: Reading SConscript files ...\n", - stderr = """ File "SConstruct", line 2 + stderr = """ File "SConstruct", line 2 a ! x @@ -144,7 +144,7 @@ raise SCons.Errors.UserError, 'Depends() require both sources and targets.' """) test.run(stdout = "scons: Reading SConscript files ...\n", - stderr = """ + stderr = """ scons: \*\*\* Depends\(\) require both sources and targets. File "SConstruct", line 4, in \? """, status=2) @@ -159,7 +159,7 @@ raise InternalError, 'error inside' """) test.run(stdout = "scons: Reading SConscript files ...\ninternal error\n", - stderr = r"""Traceback \((most recent call|innermost) last\): + stderr = r"""Traceback \((most recent call|innermost) last\): File ".+", line \d+, in .+ File ".+", line \d+, in .+ File ".+", line \d+, in .+ diff --git a/test/expansion.py b/test/expansion.py index 7b8676b..2c22291 100644 --- a/test/expansion.py +++ b/test/expansion.py @@ -55,9 +55,9 @@ test.write(['sub', 'f1.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub/f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub/f1.c\n"); + exit (0); } """) @@ -65,9 +65,9 @@ test.write('f2.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f2.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f2.c\n"); + exit (0); } """) @@ -75,9 +75,9 @@ test.write(['sub', 'f3.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub/f3.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub/f3.c\n"); + exit (0); } """) @@ -85,9 +85,9 @@ test.write(['sub', 'foo4.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub/foo4.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub/foo4.c\n"); + exit (0); } """) diff --git a/test/file-names.py b/test/file-names.py index 7de2d83..6f486c9 100644 --- a/test/file-names.py +++ b/test/file-names.py @@ -75,7 +75,7 @@ for i in range(1, 255): if not bad_char(c): if c in '$': c = '\\' + c - infile = "in" + c + "in" + infile = "in" + c + "in" env.Command(c + "out", infile, "cp $SOURCE $TARGET") env.Command("out" + c + "out", infile, "cp $SOURCE $TARGET") env.Command("out" + c, infile, "cp $SOURCE $TARGET") diff --git a/test/long-lines.py b/test/long-lines.py index a883e37..afa8455 100644 --- a/test/long-lines.py +++ b/test/long-lines.py @@ -76,9 +76,9 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); } """) @@ -86,9 +86,9 @@ test.write('static.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("static.c\n"); - exit (0); + argv[argc++] = "--"; + printf("static.c\n"); + exit (0); } """) @@ -96,9 +96,9 @@ test.write('shared.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("shared.c\n"); - exit (0); + argv[argc++] = "--"; + printf("shared.c\n"); + exit (0); } """) diff --git a/test/multi.py b/test/multi.py index 1977679..5a5d667 100644 --- a/test/multi.py +++ b/test/multi.py @@ -171,11 +171,14 @@ env.B(target = 'file4.out', source = 'file4b.in', foo=3) test.write('file4a.in', 'file4a.in\n') test.write('file4b.in', 'file4b.in\n') +python_expr = string.replace(TestSCons.python, '\\', '\\\\') +act = TestSCons.re_escape('%s build.py \$foo \$TARGET \$SOURCES' % python_expr) + test.run(arguments='file4.out', - stderr=TestSCons.re_escape(""" + stderr=(""" scons: warning: Two different environments were specified for target file4.out, - but they appear to have the same action: %(python)s build.py \$foo \$TARGET \$SOURCES -""" % {'python':string.replace(TestSCons.python, '\\', '\\\\')}) + TestSCons.file_expr) +\tbut they appear to have the same action: %s +""" % act) + TestSCons.file_expr) test.must_match('file4.out', "3\nfile4a.in\nfile4b.in\n") @@ -204,7 +207,7 @@ test.write('file5b.in', 'file5b.in\n') test.run(arguments='file5.out', stderr=TestSCons.re_escape(""" scons: warning: Two different environments were specified for target file5.out, - but they appear to have the same action: build(target, source, env) +\tbut they appear to have the same action: build(target, source, env) """) + TestSCons.file_expr) test.must_match('file5.out', "file5a.in\nfile5b.in\n") diff --git a/test/option--C.py b/test/option--C.py index 0a11688..47e067b 100644 --- a/test/option--C.py +++ b/test/option--C.py @@ -68,23 +68,23 @@ print env.GetBuildPath('../$FOO/$BAR') """) test.run(arguments = '-C sub .', - stdout = test.wrap_stdout(read_str = '%s\n' % wpath, - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = '%s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-C sub -C dir .', - stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar, - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar, + build_str = "scons: `.' is up to date.\n")) test.run(arguments = ".", - stdout = test.wrap_stdout(read_str = 'SConstruct %s\n' % wpath, - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = 'SConstruct %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--directory=sub/dir .', - stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar, - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar, + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-C %s -C %s .' % (wpath_sub_dir, wpath_sub), - stdout = test.wrap_stdout(read_str = '%s\n' % wpath, - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = '%s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/option--I.py b/test/option--I.py index 05da4c0..0f422e6 100644 --- a/test/option--I.py +++ b/test/option--I.py @@ -53,11 +53,11 @@ print bar.variable test.run(arguments = '-I sub1 -I sub2 .', stdout = test.wrap_stdout(read_str = 'sub1/foo\nsub2/bar\n', - build_str = "scons: `.' is up to date.\n")) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--include-dir=sub2 --include-dir=sub1 .', - stdout = test.wrap_stdout(read_str = 'sub2/foo\nsub2/bar\n', - build_str = "scons: `.' is up to date.\n")) + stdout = test.wrap_stdout(read_str = 'sub2/foo\nsub2/bar\n', + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/option--R.py b/test/option--R.py index 451e0a9..c61167b 100644 --- a/test/option--R.py +++ b/test/option--R.py @@ -33,10 +33,10 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-R .', - stderr = "Warning: the -R option is not yet implemented\n") + stderr = "Warning: the -R option is not yet implemented\n") test.run(arguments = '--no-builtin-variables .', - stderr = "Warning: the --no-builtin-variables option is not yet implemented\n") + stderr = "Warning: the --no-builtin-variables option is not yet implemented\n") test.pass_test() diff --git a/test/option--S.py b/test/option--S.py index 48befe6..fbe9128 100644 --- a/test/option--S.py +++ b/test/option--S.py @@ -35,7 +35,7 @@ test.write('SConstruct', "") test.run(arguments = '-S .', stderr = "Warning: ignoring -S option\n") test.run(arguments = '--no-keep-going .', - stderr = "Warning: ignoring --no-keep-going option\n") + stderr = "Warning: ignoring --no-keep-going option\n") test.run(arguments = '--stop .', stderr = "Warning: ignoring --stop option\n") diff --git a/test/option--W.py b/test/option--W.py index 2e9729d..f6d07e8 100644 --- a/test/option--W.py +++ b/test/option--W.py @@ -33,16 +33,16 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-W foo .', - stderr = "Warning: the -W option is not yet implemented\n") + stderr = "Warning: the -W option is not yet implemented\n") test.run(arguments = '--what-if=foo .', - stderr = "Warning: the --what-if option is not yet implemented\n") + stderr = "Warning: the --what-if option is not yet implemented\n") test.run(arguments = '--new-file=foo .', - stderr = "Warning: the --new-file option is not yet implemented\n") + stderr = "Warning: the --new-file option is not yet implemented\n") test.run(arguments = '--assume-new=foo .', - stderr = "Warning: the --assume-new option is not yet implemented\n") + stderr = "Warning: the --assume-new option is not yet implemented\n") test.pass_test() diff --git a/test/option--cs.py b/test/option--cs.py index 5f0ec39..16a3a73 100644 --- a/test/option--cs.py +++ b/test/option--cs.py @@ -161,9 +161,9 @@ test.write(['src2', 'hello.c'], r"""\ int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("src2/hello.c\n"); - exit (0); + argv[argc++] = "--"; + printf("src2/hello.c\n"); + exit (0); } """) diff --git a/test/option--debug.py b/test/option--debug.py index ce0aed4..f60710d 100644 --- a/test/option--debug.py +++ b/test/option--debug.py @@ -41,9 +41,9 @@ test.write('foo.c', r""" #include "foo.h" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py index dc4f519..2508cf2 100644 --- a/test/option--implicit-cache.py +++ b/test/option--implicit-cache.py @@ -80,7 +80,7 @@ main(int argc, char *argv[]) test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 1\n" +#define FOO_STRING "include/foo.h 1\n" #include """) @@ -112,7 +112,7 @@ main(int argc, char *argv[]) test.write(['subdir', 'include', 'foo.h'], r""" -#define FOO_STRING "subdir/include/foo.h 1\n" +#define FOO_STRING "subdir/include/foo.h 1\n" #include "bar.h" """) @@ -144,7 +144,7 @@ test.up_to_date(arguments = args) # Make sure implicit dependenies work right when one is modifed: test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 2\n" +#define FOO_STRING "include/foo.h 2\n" #include "bar.h" """) @@ -165,7 +165,7 @@ test.up_to_date(arguments = args) # doesn't produce redundant rebuilds: test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 2\n" +#define FOO_STRING "include/foo.h 2\n" #include "bar.h" #include "baz.h" """) @@ -185,7 +185,7 @@ test.up_to_date(arguments = args) test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 2\n" +#define FOO_STRING "include/foo.h 2\n" #include "baz.h" #include "bar.h" """) @@ -228,7 +228,7 @@ test.run(program = test.workpath(variant_prog), # Now modifying include/foo.h should make scons aware of inc2/foo.h test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 3\n" +#define FOO_STRING "include/foo.h 3\n" #include "bar.h" """) @@ -264,7 +264,7 @@ test.run(arguments = "--implicit-cache one%s"%_obj) # Test forcing of implicit caching: test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 3\n" +#define FOO_STRING "include/foo.h 3\n" #include "bar.h" """) @@ -272,7 +272,7 @@ test.run(arguments = "--implicit-cache " + args) test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 3\n" +#define FOO_STRING "include/foo.h 3\n" #include "baz.h" #include "bar.h" """) @@ -294,7 +294,7 @@ assert string.find(test.stdout(), 'is up to date') == -1, test.stdout() # Test forcing rescanning: test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 3\n" +#define FOO_STRING "include/foo.h 3\n" #include "bar.h" """) @@ -302,7 +302,7 @@ test.run(arguments = "--implicit-cache " + args) test.write(['include', 'foo.h'], r""" -#define FOO_STRING "include/foo.h 3\n" +#define FOO_STRING "include/foo.h 3\n" #include "baz.h" #include "bar.h" """) diff --git a/test/option--la.py b/test/option--la.py index a192d19..5f244d6 100644 --- a/test/option--la.py +++ b/test/option--la.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--list-actions .', - stderr = "Warning: the --list-actions option is not yet implemented\n") + stderr = "Warning: the --list-actions option is not yet implemented\n") test.pass_test() diff --git a/test/option--ld.py b/test/option--ld.py index dbb2ff5..ae02d77 100644 --- a/test/option--ld.py +++ b/test/option--ld.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--list-derived .', - stderr = "Warning: the --list-derived option is not yet implemented\n") + stderr = "Warning: the --list-derived option is not yet implemented\n") test.pass_test() diff --git a/test/option--lw.py b/test/option--lw.py index 62377fe..56d4bda 100644 --- a/test/option--lw.py +++ b/test/option--lw.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--list-where .', - stderr = "Warning: the --list-where option is not yet implemented\n") + stderr = "Warning: the --list-where option is not yet implemented\n") test.pass_test() diff --git a/test/option--npd.py b/test/option--npd.py index 76145df..352196a 100644 --- a/test/option--npd.py +++ b/test/option--npd.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--no-print-directory .', - stderr = "Warning: the --no-print-directory option is not yet implemented\n") + stderr = "Warning: the --no-print-directory option is not yet implemented\n") test.pass_test() diff --git a/test/option--override.py b/test/option--override.py index 7e28c24..544a0b8 100644 --- a/test/option--override.py +++ b/test/option--override.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--override=foo .', - stderr = "Warning: the --override option is not yet implemented\n") + stderr = "Warning: the --override option is not yet implemented\n") test.pass_test() diff --git a/test/option--warn.py b/test/option--warn.py index 62245ab..3553f4f 100644 --- a/test/option--warn.py +++ b/test/option--warn.py @@ -123,7 +123,7 @@ test.write('file1b.in', 'file1b.in\n') test.run(arguments='file1.out', stderr=r""" scons: warning: Two different environments were specified for target file1.out, - but they appear to have the same action: build\(target, source, env\) +\tbut they appear to have the same action: build\(target, source, env\) """ + TestSCons.file_expr) test.must_match('file1.out', "file1a.in\nfile1b.in\n") @@ -131,7 +131,7 @@ test.must_match('file1.out', "file1a.in\nfile1b.in\n") test.run(arguments='--warn=duplicate-environment file1.out', stderr=r""" scons: warning: Two different environments were specified for target file1.out, - but they appear to have the same action: build\(target, source, env\) +\tbut they appear to have the same action: build\(target, source, env\) """ + TestSCons.file_expr) test.run(arguments='--warn=no-duplicate-environment file1.out') diff --git a/test/option--wf.py b/test/option--wf.py index d366954..e8bc701 100644 --- a/test/option--wf.py +++ b/test/option--wf.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '--write-filenames=FILE .', - stderr = "Warning: the --write-filenames option is not yet implemented\n") + stderr = "Warning: the --write-filenames option is not yet implemented\n") test.pass_test() diff --git a/test/option--wuv.py b/test/option--wuv.py index 71e42bb..7fd731a 100644 --- a/test/option--wuv.py +++ b/test/option--wuv.py @@ -36,12 +36,12 @@ test = TestSCons.TestSCons() # control. The getopt module reports "--warn not a unique prefix" # when both are defined. We may be able to support both in the # future with a more robust getopt solution. -test.pass_test() #XXX Short-circuit until then. +test.pass_test() #XXX Short-circuit until then. test.write('SConstruct', "") test.run(arguments = '--warn-undefined-variables', - stderr = "Warning: the --warn-undefined-variables option is not yet implemented\n") + stderr = "Warning: the --warn-undefined-variables option is not yet implemented\n") test.pass_test() diff --git a/test/option-b.py b/test/option-b.py index f2b27f6..cdaf348 100644 --- a/test/option-b.py +++ b/test/option-b.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-b .', - stderr = "Warning: ignoring -b option\n") + stderr = "Warning: ignoring -b option\n") test.pass_test() diff --git a/test/option-d.py b/test/option-d.py index 209b078..58bc9e4 100644 --- a/test/option-d.py +++ b/test/option-d.py @@ -28,7 +28,7 @@ import TestSCons test = TestSCons.TestSCons() -test.pass_test() #XXX Short-circuit until this is supported. +test.pass_test() #XXX Short-circuit until this is supported. test.subdir('subdir') @@ -49,9 +49,9 @@ test.write('aaa.c', """ int main(int argc, char *argv) { - argv[argc++] = "--"; - printf("aaa.c\n"); - exit (0); + argv[argc++] = "--"; + printf("aaa.c\n"); + exit (0); } """) @@ -59,9 +59,9 @@ test.write('bbb.c', """ int main(int argc, char *argv) { - argv[argc++] = "--"; - printf("bbb.c\n"); - exit (0); + argv[argc++] = "--"; + printf("bbb.c\n"); + exit (0); } """) @@ -69,9 +69,9 @@ test.write(['subdir', 'ccc.c'], """ int main(int argc, char *argv) { - argv[argc++] = "--"; - printf("subdir/ccc.c\n"); - exit (0); + argv[argc++] = "--"; + printf("subdir/ccc.c\n"); + exit (0); } """) @@ -79,9 +79,9 @@ test.write(['subdir', 'ddd.c'], """ int main(int argc, char *argv) { - argv[argc++] = "--"; - printf("subdir/ddd.c\n"); - exit (0); + argv[argc++] = "--"; + printf("subdir/ddd.c\n"); + exit (0); } """) diff --git a/test/option-e.py b/test/option-e.py index 13a46de..1862ae7 100644 --- a/test/option-e.py +++ b/test/option-e.py @@ -33,10 +33,10 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-e .', - stderr = "Warning: the -e option is not yet implemented\n") + stderr = "Warning: the -e option is not yet implemented\n") test.run(arguments = '--environment-overrides .', - stderr = "Warning: the --environment-overrides option is not yet implemented\n") + stderr = "Warning: the --environment-overrides option is not yet implemented\n") test.pass_test() diff --git a/test/option-l.py b/test/option-l.py index 84223c2..65ec69b 100644 --- a/test/option-l.py +++ b/test/option-l.py @@ -33,13 +33,13 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-l 1 .', - stderr = "Warning: the -l option is not yet implemented\n") + stderr = "Warning: the -l option is not yet implemented\n") test.run(arguments = '--load-average=1 .', - stderr = "Warning: the --load-average option is not yet implemented\n") + stderr = "Warning: the --load-average option is not yet implemented\n") test.run(arguments = '--max-load=1 .', - stderr = "Warning: the --max-load option is not yet implemented\n") + stderr = "Warning: the --max-load option is not yet implemented\n") test.pass_test() diff --git a/test/option-m.py b/test/option-m.py index cc680ae..8ec28b7 100644 --- a/test/option-m.py +++ b/test/option-m.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-m .', - stderr = "Warning: ignoring -m option\n") + stderr = "Warning: ignoring -m option\n") test.pass_test() diff --git a/test/option-o.py b/test/option-o.py index 90ad430..caa3d76 100644 --- a/test/option-o.py +++ b/test/option-o.py @@ -33,13 +33,13 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-o foo .', - stderr = "Warning: the -o option is not yet implemented\n") + stderr = "Warning: the -o option is not yet implemented\n") test.run(arguments = '--old-file=foo .', - stderr = "Warning: the --old-file option is not yet implemented\n") + stderr = "Warning: the --old-file option is not yet implemented\n") test.run(arguments = '--assume-old=foo .', - stderr = "Warning: the --assume-old option is not yet implemented\n") + stderr = "Warning: the --assume-old option is not yet implemented\n") test.pass_test() diff --git a/test/option-p.py b/test/option-p.py index cdc989c..52228ef 100644 --- a/test/option-p.py +++ b/test/option-p.py @@ -33,7 +33,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-p .', - stderr = "Warning: the -p option is not yet implemented\n") + stderr = "Warning: the -p option is not yet implemented\n") test.pass_test() diff --git a/test/option-r.py b/test/option-r.py index ad58f11..9770c9a 100644 --- a/test/option-r.py +++ b/test/option-r.py @@ -33,10 +33,10 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-r .', - stderr = "Warning: the -r option is not yet implemented\n") + stderr = "Warning: the -r option is not yet implemented\n") test.run(arguments = '--no-builtin-rules .', - stderr = "Warning: the --no-builtin-rules option is not yet implemented\n") + stderr = "Warning: the --no-builtin-rules option is not yet implemented\n") test.pass_test() diff --git a/test/option-t.py b/test/option-t.py index d8c02b8..ac53b81 100644 --- a/test/option-t.py +++ b/test/option-t.py @@ -33,10 +33,10 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-t .', - stderr = "Warning: ignoring -t option\n") + stderr = "Warning: ignoring -t option\n") test.run(arguments = '--touch .', - stderr = "Warning: ignoring --touch option\n") + stderr = "Warning: ignoring --touch option\n") test.pass_test() diff --git a/test/option-w.py b/test/option-w.py index 9c66772..759131c 100644 --- a/test/option-w.py +++ b/test/option-w.py @@ -33,10 +33,10 @@ test = TestSCons.TestSCons() test.write('SConstruct', "") test.run(arguments = '-w .', - stderr = "Warning: the -w option is not yet implemented\n") + stderr = "Warning: the -w option is not yet implemented\n") test.run(arguments = '--print-directory .', - stderr = "Warning: the --print-directory option is not yet implemented\n") + stderr = "Warning: the --print-directory option is not yet implemented\n") test.pass_test() diff --git a/test/option/debug-dtree.py b/test/option/debug-dtree.py index c93ff7f..0a7f4d2 100644 --- a/test/option/debug-dtree.py +++ b/test/option/debug-dtree.py @@ -46,9 +46,9 @@ test.write('foo.c', r""" #include "foo.h" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) diff --git a/test/option/debug-includes.py b/test/option/debug-includes.py index c232175..eb7f818 100644 --- a/test/option/debug-includes.py +++ b/test/option/debug-includes.py @@ -46,9 +46,9 @@ test.write('foo.c', r""" #include "foo.h" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) diff --git a/test/option/debug-stree.py b/test/option/debug-stree.py index ba18cfb..4132927 100644 --- a/test/option/debug-stree.py +++ b/test/option/debug-stree.py @@ -46,9 +46,9 @@ test.write('foo.c', r""" #include "foo.h" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) diff --git a/test/option/debug-tree.py b/test/option/debug-tree.py index 975e9b3..faf85d9 100644 --- a/test/option/debug-tree.py +++ b/test/option/debug-tree.py @@ -50,9 +50,9 @@ test.write('Foo.c', r""" #include "Foo.h" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); + argv[argc++] = "--"; + printf("f1.c\n"); + exit (0); } """) diff --git a/test/same-name.py b/test/same-name.py index 93dea66..99a0ea5 100644 --- a/test/same-name.py +++ b/test/same-name.py @@ -45,10 +45,10 @@ test.write('foo.c', r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; + argv[argc++] = "--"; bu(); - printf("foo.c\n"); - exit (0); + printf("foo.c\n"); + exit (0); } """) diff --git a/test/scan-once.py b/test/scan-once.py index fd50982..90af11e 100644 --- a/test/scan-once.py +++ b/test/scan-once.py @@ -69,7 +69,7 @@ XScanner = Scanner(name = 'XScanner', function = scan, argument = None, scan_check = exists_check, - skeys = ['.x']) + skeys = ['.x']) def echo(env, target, source): t = os.path.split(str(target[0]))[1] @@ -78,7 +78,7 @@ def echo(env, target, source): Echo = Builder(action = Action(echo, None), src_suffix = '.x', - suffix = '.x') + suffix = '.x') env = Environment(BUILDERS = {'Echo':Echo}, SCANNERS = [XScanner]) @@ -108,7 +108,7 @@ builders = Environment().Dictionary('BUILDERS') builders["StaticLibMerge"] = BStaticLibMerge env = Environment(BUILDERS = builders) -e = env.Dictionary() # Slightly easier to type +e = env.Dictionary() # Slightly easier to type global_env = env e["GlobalEnv"] = global_env diff --git a/test/sconsign/script.py b/test/sconsign/script.py index 624c18b..86f6292 100644 --- a/test/sconsign/script.py +++ b/test/sconsign/script.py @@ -56,11 +56,11 @@ def re_sep(*args): class MyTestSCons(TestSCons.TestSCons): # subclass with a method for running the sconsign script def __init__(self, *args, **kw): - apply(TestSCons.TestSCons.__init__, (self,)+args, kw) - self.my_kw = { + apply(TestSCons.TestSCons.__init__, (self,)+args, kw) + self.my_kw = { 'interpreter' : TestSCons.python, - 'program' : sconsign, - } + 'program' : sconsign, + } def run_sconsign(self, *args, **kw): kw.update(self.my_kw) return apply(self.run, args, kw) @@ -85,9 +85,9 @@ test.write(['work1', 'sub1', 'hello.c'], r"""\ int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub1/hello.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub1/hello.c\n"); + exit (0); } """) @@ -97,9 +97,9 @@ test.write(['work1', 'sub2', 'hello.c'], r"""\ int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub2/goodbye.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub2/goodbye.c\n"); + exit (0); } """) @@ -277,9 +277,9 @@ test.write(['work2', 'sub1', 'hello.c'], r"""\ int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub1/hello.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub1/hello.c\n"); + exit (0); } """) @@ -289,9 +289,9 @@ test.write(['work2', 'sub2', 'hello.c'], r"""\ int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("sub2/goodbye.c\n"); - exit (0); + argv[argc++] = "--"; + printf("sub2/goodbye.c\n"); + exit (0); } """) diff --git a/test/signature-order.py b/test/signature-order.py index 3fc9f5f..8fb15bf 100644 --- a/test/signature-order.py +++ b/test/signature-order.py @@ -70,9 +70,9 @@ test.write(['work1', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING); + exit (0); } """) @@ -103,9 +103,9 @@ test.write(['work2', 'foo.c'], r""" int main(int argc, char *argv[]) { - argv[argc++] = "--"; - printf("%s\n", STRING); - exit (0); + argv[argc++] = "--"; + printf("%s\n", STRING); + exit (0); } """) diff --git a/test/strfunction.py b/test/strfunction.py index 4180d21..ef8c483 100644 --- a/test/strfunction.py +++ b/test/strfunction.py @@ -98,14 +98,14 @@ env.Dict('dict7.out', 'dict7.list') env.Dict('dict8.out', 'dict8.liststr') """ % (python, python, python, python)) -test.write('func.in', "func.in\n") -test.write('funcstr.in', "funcstr.in\n") -test.write('cmd.in', "cmd.in\n") -test.write('cmdstr.in', "cmdstr.in\n") -test.write('lazy.in', "lazy.in\n") -test.write('lazystr.in', "lazystr.in\n") -test.write('list.in', "list.in\n") -test.write('liststr.in', "liststr.in\n") +test.write('func.in', "func.in\n") +test.write('funcstr.in', "funcstr.in\n") +test.write('cmd.in', "cmd.in\n") +test.write('cmdstr.in', "cmdstr.in\n") +test.write('lazy.in', "lazy.in\n") +test.write('lazystr.in', "lazystr.in\n") +test.write('list.in', "list.in\n") +test.write('liststr.in', "liststr.in\n") test.write('dict1.cmd', "dict1.cmd\n") test.write('dict2.cmdstr', "dict2.cmdstr\n") -- cgit v0.12