1#!/usr/bin/python 2 3# Copyright 2003 Dave Abrahams 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# This tests the facilities for deleting modules. 8 9import BoostBuild 10 11t = BoostBuild.Tester(pass_toolset=0) 12 13t.write("file.jam", """ 14module foo 15{ 16 rule bar { } 17 var = x y ; 18} 19DELETE_MODULE foo ; 20if [ RULENAMES foo ] 21{ 22 EXIT DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ; 23} 24 25module foo 26{ 27 if $(var) 28 { 29 EXIT DELETE_MODULE failed to kill foo's variables ; 30 } 31 32 rule bar { } 33 var = x y ; 34 35 DELETE_MODULE foo ; 36 37 if $(var) 38 { 39 EXIT internal DELETE_MODULE failed to kill foo's variables ; 40 } 41 if [ RULENAMES foo ] 42 { 43 EXIT internal DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ; 44 } 45} 46DEPENDS all : xx ; 47NOTFILE xx ; 48""") 49 50t.run_build_system(["-ffile.jam"], status=0) 51t.cleanup() 52