summaryrefslogtreecommitdiffstats
path: root/test/LIBPATH.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-03-12 21:53:24 (GMT)
committerSteven Knight <knight@baldmt.com>2002-03-12 21:53:24 (GMT)
commita441c8d1cc8bf1ed0817b4b1deb9ff2e912bb9f0 (patch)
tree5ee2cd288a5dc2d36b8ac73483d460fd0107302a /test/LIBPATH.py
parent50ef9e4b3dbf4f1a345297d12ffe98679c50d9d1 (diff)
downloadSCons-a441c8d1cc8bf1ed0817b4b1deb9ff2e912bb9f0.zip
SCons-a441c8d1cc8bf1ed0817b4b1deb9ff2e912bb9f0.tar.gz
SCons-a441c8d1cc8bf1ed0817b4b1deb9ff2e912bb9f0.tar.bz2
Support whitespace separated CPPPATH, etc. (Task 49057). (Steve Leblanc)
Diffstat (limited to 'test/LIBPATH.py')
-rw-r--r--test/LIBPATH.py45
1 files changed, 34 insertions, 11 deletions
diff --git a/test/LIBPATH.py b/test/LIBPATH.py
index b2ead7a..30bc421 100644
--- a/test/LIBPATH.py
+++ b/test/LIBPATH.py
@@ -36,14 +36,16 @@ else:
test = TestSCons.TestSCons()
+test.subdir('lib1', 'lib2')
+
prog1 = test.workpath('prog') + _exe
prog2 = test.workpath('prog2') + _exe
test.write('SConstruct', """
-env = Environment(LIBS = [ 'foo1' ],
- LIBPATH = [ './libs' ])
-env.Program(target = 'prog', source = 'prog.c')
-env.Library(target = './libs/foo1', source = 'f1.c')
+env1 = Environment(LIBS = [ 'foo1' ],
+ LIBPATH = [ './lib1' ])
+env1.Program(target = 'prog', source = 'prog.c')
+env1.Library(target = './lib1/foo1', source = 'f1.c')
env2 = Environment(LIBS = 'foo2',
LIBPATH = '.')
@@ -90,28 +92,49 @@ test.write('f1.c', r"""
void
f1(void)
{
- printf("f1.cnew\n");
+ printf("f1.c 1\n");
}
""")
test.run(arguments = '.')
test.run(program = prog1,
- stdout = "f1.cnew\nprog.c\n")
+ stdout = "f1.c 1\nprog.c\n")
test.run(program = prog2,
- stdout = "f1.cnew\nprog.c\n")
+ stdout = "f1.c 1\nprog.c\n")
test.up_to_date(arguments = '.')
# Change LIBPATH and make sure we don't rebuild because of it.
test.write('SConstruct', """
-env = Environment(LIBS = [ 'foo1' ],
- LIBPATH = [ './libs', './lib2' ])
-env.Program(target = 'prog', source = 'prog.c')
-env.Library(target = './libs/foo1', source = 'f1.c')
+env1 = Environment(LIBS = [ 'foo1' ],
+ LIBPATH = [ './lib1', './lib2' ])
+env1.Program(target = 'prog', source = 'prog.c')
+env1.Library(target = './lib1/foo1', source = 'f1.c')
+
+env2 = Environment(LIBS = 'foo2',
+ LIBPATH = '. ./lib2')
+env2.Program(target = 'prog2', source = 'prog.c')
+env2.Library(target = 'foo2', source = 'f1.c')
""")
test.up_to_date(arguments = '.', stderr = None)
+test.write('f1.c', r"""
+void
+f1(void)
+{
+ printf("f1.c 2\n");
+}
+""")
+
+test.run(arguments = '.')
+test.run(program = prog1,
+ stdout = "f1.c 2\nprog.c\n")
+test.run(program = prog2,
+ stdout = "f1.c 2\nprog.c\n")
+
+test.up_to_date(arguments = '.')
+
# Check that a null-string LIBPATH doesn't blow up.
test.write('SConstruct', """
env = Environment(LIBPATH = '')