example_gettext.py 656 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/python
  2. # Copyright (C) Vladimir Prus 2006.
  3. # Distributed under the Boost Software License, Version 1.0. (See
  4. # accompanying file LICENSE.txt or copy at
  5. # https://www.bfgroup.xyz/b2/LICENSE.txt)
  6. # Test the 'gettext' example.
  7. import BoostBuild
  8. import os
  9. import string
  10. t = BoostBuild.Tester()
  11. t.set_tree("../example/gettext")
  12. t.run_build_system(stderr=None)
  13. t.expect_addition(["bin/$toolset/debug*/main.exe",
  14. "bin/$toolset/debug*/russian.mo"])
  15. file = t.adjust_names(["bin/$toolset/debug*/main.exe"])[0]
  16. input_fd = os.popen(file)
  17. input = input_fd.read();
  18. t.fail_test(input.find("international hello") != 0)
  19. t.cleanup()