]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/param.py
3 # Copyright 2018 Steven Watanabe
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
10 t
= BoostBuild
.Tester(pass_toolset
=0)
12 t
.write("Jamroot.jam", """\
15 import errors : try catch ;
18 param.handle-named-params ;
21 rule test2 ( sources * )
23 param.handle-named-params sources ;
26 assert.result : test2 ;
27 assert.result test1.cpp test2.cpp : test2 test1.cpp test2.cpp ;
28 assert.result test1.cpp test2.cpp : test2 sources test1.cpp test2.cpp ;
29 rule test3 ( sources * : requirements * )
31 param.handle-named-params sources requirements ;
32 return $(sources) -- $(requirements) ;
34 assert.result -- : test3 ;
35 assert.result -- <link>shared : test3 : <link>shared ;
36 assert.result test1.cpp -- <link>shared : test3 test1.cpp : <link>shared ;
37 assert.result test1.cpp -- <link>shared
38 : test3 test1.cpp : requirements <link>shared ;
39 assert.result test1.cpp -- <link>shared
40 : test3 sources test1.cpp : requirements <link>shared ;
41 assert.result test1.cpp -- <link>shared
42 : test3 requirements <link>shared : sources test1.cpp ;
43 assert.result -- : test3 sources ;
44 assert.result -- : test3 requirements ;
45 assert.result -- <link>shared : test3 requirements <link>shared ;
48 test3 sources test1.cpp : sources test2.cpp ;
50 catch Parameter 'sources' passed more than once. ;
53 test3 sources test1.cpp : <link>shared ;
55 catch "Positional arguments must appear first." ;