build/test/example_gettext.py
Rene Rivera 85e5a2caa8 Port b2 tests to dual py2 and py3.
Now that the tests work in py2 or p3 we don't set py version in AP. This
allows for dealing with the AP images that don't have a way to set the
py version.
2019-03-31 15:37:03 -05:00

31 lines
658 B
Python

#!/usr/bin/python
# Copyright (C) Vladimir Prus 2006.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test the 'gettext' example.
import BoostBuild
import os
import string
t = BoostBuild.Tester()
t.set_tree("../example/gettext")
t.run_build_system(stderr=None)
t.expect_addition(["bin/$toolset/debug*/main.exe",
"bin/$toolset/debug*/russian.mo"])
file = t.adjust_names(["bin/$toolset/debug*/main.exe"])[0]
input_fd = os.popen(file)
input = input_fd.read();
t.fail_test(input.find("international hello") != 0)
t.cleanup()