summaryrefslogtreecommitdiffstats
path: root/test/CXX/SHCXXCOMSTR.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-11-21 00:41:12 (GMT)
committerSteven Knight <knight@baldmt.com>2004-11-21 00:41:12 (GMT)
commitffc625f8cf332399ba754bf2ebe9e700e5122eac (patch)
tree9c21395a4d49fd3aba7a22fe8e93b041445b00b3 /test/CXX/SHCXXCOMSTR.py
parent376cfbfee0d52e867f2c6b955b6e218d788284ba (diff)
downloadSCons-ffc625f8cf332399ba754bf2ebe9e700e5122eac.zip
SCons-ffc625f8cf332399ba754bf2ebe9e700e5122eac.tar.gz
SCons-ffc625f8cf332399ba754bf2ebe9e700e5122eac.tar.bz2
Miscellaneous fixes: portability and version fixes, missing , better CXXCOM tests, ATL include directories, intelc Tool import.
Diffstat (limited to 'test/CXX/SHCXXCOMSTR.py')
-rw-r--r--test/CXX/SHCXXCOMSTR.py45
1 files changed, 27 insertions, 18 deletions
diff --git a/test/CXX/SHCXXCOMSTR.py b/test/CXX/SHCXXCOMSTR.py
index 2c43393..ad3a907 100644
--- a/test/CXX/SHCXXCOMSTR.py
+++ b/test/CXX/SHCXXCOMSTR.py
@@ -45,41 +45,50 @@ test.write('mycc.py', r"""
import sys
outfile = open(sys.argv[1], 'wb')
infile = open(sys.argv[2], 'rb')
-for l in filter(lambda l: l[:6] != '/*cc*/', infile.readlines()):
+for l in filter(lambda l: l != '/*c++*/\n', infile.readlines()):
outfile.write(l)
sys.exit(0)
""")
if os.path.normcase('.c') == os.path.normcase('.C'):
- alt_cc_suffix = '.CC'
+ alt_cpp_suffix = '.cpp'
else:
- alt_cc_suffix = '.cc'
+ alt_cpp_suffix = '.C'
test.write('SConstruct', """
env = Environment(SHCXXCOM = r'%(python)s mycc.py $TARGET $SOURCE',
SHCXXCOMSTR = 'Building shared object $TARGET from $SOURCE',
SHOBJSUFFIX='.obj')
-env.SharedObject(target = 'test1', source = 'test1.cc')
-env.SharedObject(target = 'test2', source = 'test2%(alt_cc_suffix)s')
+env.SharedObject(target = 'test1', source = 'test1.cpp')
+env.SharedObject(target = 'test2', source = 'test2.cc')
+env.SharedObject(target = 'test3', source = 'test3.cxx')
+env.SharedObject(target = 'test4', source = 'test4.c++')
+env.SharedObject(target = 'test5', source = 'test5.C++')
+env.SharedObject(target = 'test6', source = 'test6%(alt_cpp_suffix)s')
""" % locals())
-test.write('test1.cc', """\
-test1.cc
-/*cc*/
-""")
-
-test.write('test2'+alt_cc_suffix, """\
-test2.CC
-/*cc*/
-""")
+test.write('test1.cpp', "test1.cpp\n/*c++*/\n")
+test.write('test2.cc', "test2.cc\n/*c++*/\n")
+test.write('test3.cxx', "test3.cxx\n/*c++*/\n")
+test.write('test4.c++', "test4.c++\n/*c++*/\n")
+test.write('test5.C++', "test5.C++\n/*c++*/\n")
+test.write('test6'+alt_cpp_suffix, "test6.C\n/*c++*/\n")
test.run(stdout = test.wrap_stdout("""\
-Building shared object test1.obj from test1.cc
-Building shared object test2.obj from test2%(alt_cc_suffix)s
+Building shared object test1.obj from test1.cpp
+Building shared object test2.obj from test2.cc
+Building shared object test3.obj from test3.cxx
+Building shared object test4.obj from test4.c++
+Building shared object test5.obj from test5.C++
+Building shared object test6.obj from test6%(alt_cpp_suffix)s
""" % locals()))
-test.must_match('test1.obj', "test1.cc\n")
-test.must_match('test2.obj', "test2.CC\n")
+test.must_match('test1.obj', "test1.cpp\n")
+test.must_match('test2.obj', "test2.cc\n")
+test.must_match('test3.obj', "test3.cxx\n")
+test.must_match('test4.obj', "test4.c++\n")
+test.must_match('test5.obj', "test5.C++\n")
+test.must_match('test6.obj', "test6.C\n")