summaryrefslogtreecommitdiffstats
path: root/test/AR/AR.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/AR/AR.py')
-rw-r--r--test/AR/AR.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/AR/AR.py b/test/AR/AR.py
index 32419fa..cb11175 100644
--- a/test/AR/AR.py
+++ b/test/AR/AR.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -45,7 +45,7 @@ os.system(string.join(sys.argv[1:], " "))
test.write('SConstruct', """
foo = Environment(LIBS = ['foo'], LIBPATH = ['.'])
ar = foo.Dictionary('AR')
-bar = Environment(LIBS = ['bar'], LIBPATH = ['.'], AR = r'%s wrapper.py ' + ar)
+bar = Environment(LIBS = ['bar'], LIBPATH = ['.'], AR = r'%(_python_)s wrapper.py ' + ar)
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
@@ -53,9 +53,11 @@ obj = foo.Object('main', 'main.c')
foo.Program(target = 'f', source = obj)
bar.Program(target = 'b', source = obj)
-""" % python)
+""" % locals())
test.write('foo.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -64,6 +66,8 @@ library_function(void)
""")
test.write('bar.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -72,6 +76,9 @@ library_function(void)
""")
test.write('main.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
+
int
main(int argc, char *argv[])
{