summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/build/test/feature_suppress_import_lib.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/tools/build/test/feature_suppress_import_lib.py')
-rw-r--r--src/boost/tools/build/test/feature_suppress_import_lib.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/boost/tools/build/test/feature_suppress_import_lib.py b/src/boost/tools/build/test/feature_suppress_import_lib.py
new file mode 100644
index 000000000..84de4c222
--- /dev/null
+++ b/src/boost/tools/build/test/feature_suppress_import_lib.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE.txt or copy at
+# https://www.bfgroup.xyz/b2/LICENSE.txt)
+
+# Tests the suppress-import-lib feature
+
+# This used to cause the pdb and the import lib to get mixed up
+# if there are any exports.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("Jamroot.jam", """
+lib l : l.cpp : <suppress-import-lib>true ;
+""")
+
+t.write("l.cpp", """
+void
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+f() {}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/l.obj")
+t.expect_addition("bin/$toolset/debug*/l.dll")
+
+t.cleanup()