summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-11 23:13:20 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-11 23:13:20 (GMT)
commit6f4f6e4639a3a4a796b28322ba07b9b81f2c354f (patch)
treebf1be1f8cebc4b016b9856f27d1cf84879b547be /test
parent580b07ed247ab0de0ea96093fc2c4baa28c35c65 (diff)
downloadSCons-6f4f6e4639a3a4a796b28322ba07b9b81f2c354f.zip
SCons-6f4f6e4639a3a4a796b28322ba07b9b81f2c354f.tar.gz
SCons-6f4f6e4639a3a4a796b28322ba07b9b81f2c354f.tar.bz2
Implement special variable substitution.
Diffstat (limited to 'test')
-rw-r--r--test/Command.py8
-rw-r--r--test/Default.py6
-rw-r--r--test/Depends.py4
-rw-r--r--test/ENV.py2
-rw-r--r--test/Library.py2
-rw-r--r--test/builderrors.py12
-rw-r--r--test/multiline.py6
-rw-r--r--test/option--.py2
-rw-r--r--test/option-c.py2
-rw-r--r--test/option-i.py4
-rw-r--r--test/option-j.py2
-rw-r--r--test/option-k.py4
-rw-r--r--test/option-n.py2
-rw-r--r--test/option-s.py2
-rw-r--r--test/up-to-date.py2
15 files changed, 30 insertions, 30 deletions
diff --git a/test/Command.py b/test/Command.py
index d994d5b..5b592b9 100644
--- a/test/Command.py
+++ b/test/Command.py
@@ -39,12 +39,12 @@ file.close()
test.write('SConstruct', """
env = Environment()
env.Command(target = 'f1.out', source = 'f1.in',
- action = "python build.py %(target)s %(source)s")
+ action = "python build.py $target $sources")
env.Command(target = 'f2.out', source = 'f2.in',
- action = "python build.py temp2 %(source)s\\npython build.py %(target)s temp2")
+ action = "python build.py temp2 $sources\\npython build.py $target temp2")
env.Command(target = 'f3.out', source = 'f3.in',
- action = ["python build.py temp3 %(source)s",
- "python build.py %(target)s temp3"])
+ action = ["python build.py temp3 $sources",
+ "python build.py $target temp3"])
# Eventually, add ability to do execute Python code.
""")
diff --git a/test/Default.py b/test/Default.py
index ccdc63b..515a9c0 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -40,7 +40,7 @@ file.close()
""")
test.write(['one', 'SConstruct'], """
-B = Builder(name = 'B', action = "python ../build.py %(target)s %(source)s")
+B = Builder(name = 'B', action = "python ../build.py $target $sources")
env = Environment(BUILDERS = [B])
env.B(target = 'foo.out', source = 'foo.in')
env.B(target = 'bar.out', source = 'bar.in')
@@ -48,7 +48,7 @@ Default('foo.out')
""")
test.write(['two', 'SConstruct'], """
-B = Builder(name = 'B', action = "python ../build.py %(target)s %(source)s")
+B = Builder(name = 'B', action = "python ../build.py $target $sources")
env = Environment(BUILDERS = [B])
env.B(target = 'foo.out', source = 'foo.in')
env.B(target = 'bar.out', source = 'bar.in')
@@ -56,7 +56,7 @@ Default('foo.out', 'bar.out')
""")
test.write(['three', 'SConstruct'], """
-B = Builder(name = 'B', action = "python ../build.py %(target)s %(source)s")
+B = Builder(name = 'B', action = "python ../build.py $target $sources")
env = Environment(BUILDERS = [B])
env.B(target = 'foo.out', source = 'foo.in')
env.B(target = 'bar.out', source = 'bar.in')
diff --git a/test/Depends.py b/test/Depends.py
index 71857fb..61ebb0a 100644
--- a/test/Depends.py
+++ b/test/Depends.py
@@ -40,9 +40,9 @@ file.close()
test.write('SConstruct', """
Foo = Builder(name = "Foo",
- action = "python build.py %(target)s %(source)s subdir/foo.dep")
+ action = "python build.py $target $sources subdir/foo.dep")
Bar = Builder(name = "Bar",
- action = "python build.py %(target)s %(source)s subdir/bar.dep")
+ action = "python build.py $target $sources subdir/bar.dep")
env = Environment(BUILDERS = [Foo, Bar])
env.Depends(target = ['f1.out', 'f2.out'], dependency = 'subdir/foo.dep')
env.Depends(target = 'f3.out', dependency = 'subdir/bar.dep')
diff --git a/test/ENV.py b/test/ENV.py
index cedb4ac..db51327 100644
--- a/test/ENV.py
+++ b/test/ENV.py
@@ -40,7 +40,7 @@ test.write('SConstruct', """
import os
bin1_path = r'%s' + os.pathsep + os.environ['PATH']
bin2_path = r'%s' + os.pathsep + os.environ['PATH']
-Bld = Builder(name = 'Bld', action = "build.py %%(target)s %%(source)s")
+Bld = Builder(name = 'Bld', action = "build.py $target $sources")
bin1 = Environment(ENV = {'PATH' : bin1_path}, BUILDERS = [Bld])
bin2 = Environment(ENV = {'PATH' : bin2_path}, BUILDERS = [Bld])
bin1.Bld(target = 'bin1.out', source = 'input')
diff --git a/test/Library.py b/test/Library.py
index 4941bbf..7e832ca 100644
--- a/test/Library.py
+++ b/test/Library.py
@@ -31,7 +31,7 @@ test = TestSCons.TestSCons()
#XXX Need to switch TestBld to Program() when LIBS variable is working.
test.write('SConstruct', """
TestBld = Builder(name='TestBld',
- action='cc -o %(target)s %(source)s -L./ -lfoo1 -lfoo2 -lfoo3')
+ action='cc -o $target $sources -L./ -lfoo1 -lfoo2 -lfoo3')
env = Environment(BUILDERS=[ TestBld, Library ])
env.Library(target = 'foo1', source = 'f1.c')
env.Library(target = 'foo2', source = 'f2a.c f2b.c f2c.c')
diff --git a/test/builderrors.py b/test/builderrors.py
index ab8da71..fad003a 100644
--- a/test/builderrors.py
+++ b/test/builderrors.py
@@ -43,8 +43,8 @@ sys.exit(exitval)
""")
test.write(['one', 'SConstruct'], """
-B0 = Builder(name = 'B0', action = "python ../build.py 0 %(target)s %(source)s")
-B1 = Builder(name = 'B1', action = "python ../build.py 1 %(target)s %(source)s")
+B0 = Builder(name = 'B0', action = "python ../build.py 0 $target $sources")
+B1 = Builder(name = 'B1', action = "python ../build.py 1 $target $sources")
env = Environment(BUILDERS = [B0, B1])
env.B1(target = 'f1.out', source = 'f1.in')
env.B0(target = 'f2.out', source = 'f2.in')
@@ -63,8 +63,8 @@ test.fail_test(os.path.exists(test.workpath('f2.out')))
test.fail_test(os.path.exists(test.workpath('f3.out')))
test.write(['two', 'SConstruct'], """
-B0 = Builder(name = 'B0', action = "python ../build.py 0 %(target)s %(source)s")
-B1 = Builder(name = 'B1', action = "python ../build.py 1 %(target)s %(source)s")
+B0 = Builder(name = 'B0', action = "python ../build.py 0 $target $sources")
+B1 = Builder(name = 'B1', action = "python ../build.py 1 $target $sources")
env = Environment(BUILDERS = [B0, B1])
env.B0(target = 'f1.out', source = 'f1.in')
env.B1(target = 'f2.out', source = 'f2.in')
@@ -83,8 +83,8 @@ test.fail_test(os.path.exists(test.workpath('f2.out')))
test.fail_test(os.path.exists(test.workpath('f3.out')))
test.write(['three', 'SConstruct'], """
-B0 = Builder(name = 'B0', action = "python ../build.py 0 %(target)s %(source)s")
-B1 = Builder(name = 'B1', action = "python ../build.py 1 %(target)s %(source)s")
+B0 = Builder(name = 'B0', action = "python ../build.py 0 $target $sources")
+B1 = Builder(name = 'B1', action = "python ../build.py 1 $target $sources")
env = Environment(BUILDERS = [B0, B1])
env.B0(target = 'f1.out', source = 'f1.in')
env.B0(target = 'f2.out', source = 'f2.in')
diff --git a/test/multiline.py b/test/multiline.py
index d51fa72..dca0b00 100644
--- a/test/multiline.py
+++ b/test/multiline.py
@@ -39,9 +39,9 @@ sys.exit(0)
""")
test.write('SConstruct', """
-B1 = Builder(name = 'B1', action = ["python build.py .temp %(source)s",
- "python build.py %(target)s .temp"])
-B2 = Builder(name = 'B2', action = "python build.py .temp %(source)s\\npython build.py %(target)s .temp")
+B1 = Builder(name = 'B1', action = ["python build.py .temp $sources",
+ "python build.py $targets .temp"])
+B2 = Builder(name = 'B2', action = "python build.py .temp $sources\\npython build.py $targets .temp")
env = Environment(BUILDERS = [B1, B2])
env.B1(target = 'foo1.out', source = 'foo1.in')
env.B2(target = 'foo2.out', source = 'foo2.in')
diff --git a/test/option--.py b/test/option--.py
index f44389d..e9f427a 100644
--- a/test/option--.py
+++ b/test/option--.py
@@ -40,7 +40,7 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(name = "MyBuild",
- action = "python build.py %(target)s")
+ action = "python build.py $targets")
env = Environment(BUILDERS = [MyBuild])
env.MyBuild(target = '-f1.out', source = 'f1.in')
env.MyBuild(target = '-f2.out', source = 'f2.in')
diff --git a/test/option-c.py b/test/option-c.py
index d403e04..76a60e9 100644
--- a/test/option-c.py
+++ b/test/option-c.py
@@ -38,7 +38,7 @@ file.close()
""")
test.write('SConstruct', """
-B = Builder(name = 'B', action = "python build.py %(target)s %(source)s")
+B = Builder(name = 'B', action = "python build.py $targets $sources")
env = Environment(BUILDERS = [B])
env.B(target = 'foo1.out', source = 'foo1.in')
env.B(target = 'foo2.out', source = 'foo2.in')
diff --git a/test/option-i.py b/test/option-i.py
index 9463141..3301396 100644
--- a/test/option-i.py
+++ b/test/option-i.py
@@ -43,8 +43,8 @@ sys.exit(1)
""")
test.write('SConstruct', """
-Succeed = Builder(name = "Succeed", action = "python succeed.py %(target)s")
-Fail = Builder(name = "Fail", action = "python fail.py %(target)s")
+Succeed = Builder(name = "Succeed", action = "python succeed.py $targets")
+Fail = Builder(name = "Fail", action = "python fail.py $targets")
env = Environment(BUILDERS = [Succeed, Fail])
env.Fail(target = 'aaa.1', source = 'aaa.in')
env.Succeed(target = 'aaa.out', source = 'aaa.1')
diff --git a/test/option-j.py b/test/option-j.py
index 92cfb5e..80cbcca 100644
--- a/test/option-j.py
+++ b/test/option-j.py
@@ -52,7 +52,7 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(name = "MyBuild",
- action = "python build.py %(target)s")
+ action = "python build.py $targets")
env = Environment(BUILDERS = [MyBuild])
env.MyBuild(target = 'f1', source = 'f1.in')
env.MyBuild(target = 'f2', source = 'f2.in')
diff --git a/test/option-k.py b/test/option-k.py
index 17f57ee..e8fead2 100644
--- a/test/option-k.py
+++ b/test/option-k.py
@@ -45,8 +45,8 @@ sys.exit(1)
""")
test.write('SConstruct', """
-Succeed = Builder(name = "Succeed", action = "python succeed.py %(target)s")
-Fail = Builder(name = "Fail", action = "python fail.py %(target)s")
+Succeed = Builder(name = "Succeed", action = "python succeed.py $targets")
+Fail = Builder(name = "Fail", action = "python fail.py $targets")
env = Environment(BUILDERS = [Succeed, Fail])
env.Fail(target = 'aaa.1', source = 'aaa.in')
env.Succeed(target = 'aaa.out', source = 'aaa.1')
diff --git a/test/option-n.py b/test/option-n.py
index 4e60995..cba2e96 100644
--- a/test/option-n.py
+++ b/test/option-n.py
@@ -40,7 +40,7 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(name = "MyBuild",
- action = "python build.py %(target)s")
+ action = "python build.py $targets")
env = Environment(BUILDERS = [MyBuild])
env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
diff --git a/test/option-s.py b/test/option-s.py
index f4d3c0b..fe13fb7 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -40,7 +40,7 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(name = "MyBuild",
- action = "python build.py %(target)s")
+ action = "python build.py $target")
env = Environment(BUILDERS = [MyBuild])
env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
diff --git a/test/up-to-date.py b/test/up-to-date.py
index 2ed60c4..68df0d4 100644
--- a/test/up-to-date.py
+++ b/test/up-to-date.py
@@ -40,7 +40,7 @@ file.close()
""")
test.write('SConstruct', """
-B = Builder(name = "B", action = "python build.py %(target)s %(source)s")
+B = Builder(name = "B", action = "python build.py $targets $sources")
env = Environment(BUILDERS = [B])
env.B(target = 'f1.out', source = 'f1.in')
env.B(target = 'f2.out', source = 'f2.in')