]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/testing_support.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / testing_support.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright 2008 Jurko Gospodnetic
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# Tests different aspects of Boost Builds automated testing support.
8
9import BoostBuild
10
11
12################################################################################
13#
14# test_files_with_spaces_in_their_name()
15# --------------------------------------
16#
17################################################################################
18
19def test_files_with_spaces_in_their_name():
20 """Regression test making sure test result files get created correctly when
21 testing files with spaces in their name.
22 """
23
24 t = BoostBuild.Tester(use_test_config=False)
25
26 t.write("valid source.cpp", "int main() {}\n");
27
28 t.write("invalid source.cpp", "this is not valid source code");
29
30 t.write("jamroot.jam", """
31import testing ;
32testing.compile "valid source.cpp" ;
33testing.compile-fail "invalid source.cpp" ;
34""")
35
36 t.run_build_system(status=0)
b32b8144
FG
37 t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.obj")
38 t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.test")
39 t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.obj")
40 t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.test")
7c673cae 41
b32b8144 42 t.expect_content("bin/valid source.test/$toolset/debug*/valid source.test", \
7c673cae
FG
43 "passed" )
44 t.expect_content( \
b32b8144 45 "bin/invalid source.test/$toolset/debug*/invalid source.test", \
7c673cae
FG
46 "passed" )
47 t.expect_content( \
b32b8144 48 "bin/invalid source.test/$toolset/debug*/invalid source.obj", \
7c673cae
FG
49 "failed as expected" )
50
51 t.cleanup()
52
53
54################################################################################
55#
56# main()
57# ------
58#
59################################################################################
60
61test_files_with_spaces_in_their_name()