summaryrefslogtreecommitdiff
path: root/test/srcchange.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-10-09 03:23:36 +0000
committerSteven Knight <knight@baldmt.com>2004-10-09 03:23:36 +0000
commita538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5 (patch)
treee0e0d0df134f2f47857e0a202e6ea95e78552889 /test/srcchange.py
parent6f708d0ca8b7f61a1d7ba98a945e32b25417952d (diff)
downloadscons-a538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5.tar.gz
Win32 portability fixes for tests.
Diffstat (limited to 'test/srcchange.py')
-rw-r--r--test/srcchange.py24
1 files changed, 9 insertions, 15 deletions
diff --git a/test/srcchange.py b/test/srcchange.py
index 2188bcc5..ef92aeaa 100644
--- a/test/srcchange.py
+++ b/test/srcchange.py
@@ -61,18 +61,19 @@ content_env=env.Copy()
content_env.TargetSignatures('content')
content_env.Command('revision.in', [], '%(python)s getrevision > $TARGET')
content_env.AlwaysBuild('revision.in')
-env.Precious('main.cpp')
-env.Command('main.cpp', 'revision.in', SubRevision)
-exe = env.Program('main.cpp')
+env.Precious('main.c')
+env.Command('main.c', 'revision.in', SubRevision)
+exe = env.Program('main.c')
env.Default(exe)
""" % {'python':TestSCons.python})
-test.write('main.cpp', """\
-#include <iostream>
+test.write('main.c', """\
+#include <stdio.h>
int
main(int argc, char *argv[])
{
- std::cout << "Revision $REV$" << std::endl;
+ printf("Revision $REV$\\n");
+ exit (0);
}
""")
@@ -80,18 +81,11 @@ test.write('revnum.in', '3.2\n')
prog = 'main' + TestSCons._exe
-full_build=test.wrap_stdout("""\
-%(python)s getrevision > revision.in
-subrevision(["main.cpp"], ["revision.in"])
-g++ -c -o main.o main.cpp
-g++ -o main main.o
-""" % {'python':TestSCons.python})
-
light_build=test.wrap_stdout("""\
%(python)s getrevision > revision.in
""" % {'python':TestSCons.python})
-test.run(arguments='.', stdout=full_build)
+test.run(arguments='.')
test.must_exist(prog)
test.run(program=test.workpath(prog), stdout='Revision $REV: 3.2$\n')
@@ -103,7 +97,7 @@ test.must_exist(prog)
test.write('revnum.in', '3.3\n')
-test.run(arguments='.', stdout=full_build)
+test.run(arguments='.')
test.must_exist(prog)
test.run(program=test.workpath(prog), stdout='Revision $REV: 3.3$\n')