summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/Command.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/test/Command.py b/test/Command.py
index f9111c5..5266886 100644
--- a/test/Command.py
+++ b/test/Command.py
@@ -65,24 +65,27 @@ def sub(env, target, source):
t.close()
return 0
-env = Environment()
+env = Environment(COPY_THROUGH_TEMP = "cp $SOURCE .tmp\\ncp .tmp $TARGET",
+ EXPAND = "$COPY_THROUGH_TEMP")
env.Command(target = 'f1.out', source = 'f1.in',
action = buildIt)
env.Command(target = 'f2.out', source = 'f2.in',
- action = r"%s build.py temp2 $SOURCES" + '\\n' + r"%s build.py $TARGET temp2")
+ action = r"%(python)s build.py temp2 $SOURCES" + '\\n' + r"%(python)s build.py $TARGET temp2")
env.Command(target = 'f3.out', source = 'f3.in',
- action = [ [ r'%s', 'build.py', 'temp3', '$SOURCES' ],
- [ r'%s', 'build.py', '$TARGET', 'temp3'] ])
+ action = [ [ r'%(python)s', 'build.py', 'temp3', '$SOURCES' ],
+ [ r'%(python)s', 'build.py', '$TARGET', 'temp3'] ])
Command(target = 'f4.out', source = 'sub', action = sub)
env.Command(target = 'f5.out', source = 'f5.in', action = buildIt,
XYZZY="XYZZY is set")
Command(target = 'f6.out', source = 'f6.in',
- action = r"%s build.py f6.out f6.in")
+ action = r"%(python)s build.py f6.out f6.in")
env.Command(target = 'f7.out', source = 'f7.in',
- action = r"%s build.py $TARGET $SOURCE")
+ action = r"%(python)s build.py $TARGET $SOURCE")
Command(target = 'f8.out', source = 'f8.in',
- action = r"%s build.py $TARGET $SOURCE")
-""" % (python, python, python, python, python, python, python))
+ action = r"%(python)s build.py $TARGET $SOURCE")
+env.Command(target = 'f9.out', source = 'f9.in',
+ action = r"$EXPAND")
+""" % {'python': python})
test.write('f1.in', "f1.in\n")
test.write('f2.in', "f2.in\n")
@@ -94,6 +97,7 @@ test.write('f5.in', "f5.in\n")
test.write('f6.in', "f6.in\n")
test.write('f7.in', "f7.in\n")
test.write('f8.in', "f8.in\n")
+test.write('f9.in', "f9.in\n")
test.run(arguments = '.')
@@ -105,5 +109,6 @@ test.must_match('f5.out', "XYZZY is set\nf5.in\n")
test.must_match('f6.out', "f6.in\n")
test.must_match('f7.out', "f7.in\n")
test.must_match('f8.out', "f8.in\n")
+test.must_match('f9.out', "f9.in\n")
test.pass_test()