]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/example_gettext.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / example_gettext.py
1 #!/usr/bin/python
2
3 # Copyright (C) Vladimir Prus 2006.
4 # Distributed under the Boost Software License, Version 1.0. (See
5 # accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
7
8 # Test the 'gettext' example.
9
10 import BoostBuild
11 import os
12 import string
13
14 t = BoostBuild.Tester()
15
16 t.set_tree("../example/gettext")
17
18 t.run_build_system(stderr=None)
19
20 t.expect_addition(["bin/$toolset/debug/main.exe",
21 "bin/$toolset/debug/russian.mo"])
22
23 file = t.adjust_names(["bin/$toolset/debug/main.exe"])[0]
24
25 input_fd = os.popen(file)
26 input = input_fd.read();
27
28 t.fail_test(string.find(input, "international hello") != 0)
29
30 t.cleanup()