builtin_echo.py 596 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/python
  2. # Copyright 2012 Steven Watanabe
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. # This tests the ECHO rule.
  6. import BoostBuild
  7. def test_echo(name):
  8. t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
  9. t.write("file.jam", """\
  10. %s ;
  11. UPDATE ;
  12. """ % name)
  13. t.run_build_system(stdout="\n")
  14. t.write("file.jam", """\
  15. %s a message ;
  16. UPDATE ;
  17. """ % name)
  18. t.run_build_system(stdout="a message\n")
  19. t.cleanup()
  20. test_echo("ECHO")
  21. test_echo("Echo")
  22. test_echo("echo")