1#!/usr/local/bin/python3.8 2 3# Copyright 2004 Vladimir Prus 4# Distributed under the Boost Software License, Version 1.0. 5# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 6 7# Test that the user can define his own rule that will call built-in main target 8# rule and that this will work. 9 10import BoostBuild 11 12 13t = BoostBuild.Tester(use_test_config=False) 14 15t.write("jamfile.jam", """ 16my-test : test.cpp ; 17""") 18 19t.write("test.cpp", """ 20int main() {} 21""") 22 23t.write("jamroot.jam", """ 24using testing ; 25 26rule my-test ( name ? : sources + ) 27{ 28 name ?= test ; 29 unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ; 30} 31 32IMPORT $(__name__) : my-test : : my-test ; 33""") 34 35t.run_build_system() 36t.expect_addition("bin/$toolset/debug*/test.passed") 37 38t.cleanup() 39