summaryrefslogtreecommitdiffstats
path: root/test/CXX/SHCXXCOM.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/SHCXXCOM.py')
-rw-r--r--test/CXX/SHCXXCOM.py36
1 files changed, 20 insertions, 16 deletions
diff --git a/test/CXX/SHCXXCOM.py b/test/CXX/SHCXXCOM.py
index 1a38d71..54ef0d5 100644
--- a/test/CXX/SHCXXCOM.py
+++ b/test/CXX/SHCXXCOM.py
@@ -50,32 +50,36 @@ 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',
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
-/*c++*/
-""")
-
-test.write('test2'+alt_cc_suffix, """\
-test2.CC
-/*c++*/
-""")
+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()
-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")
test.pass_test()