diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-04-15 18:48:49 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-04-15 18:48:49 (GMT) |
commit | 54b73e170a60275b7b343b0a89b439ae86bb63c4 (patch) | |
tree | a7cee63236d0ec8ed7210781b655265b1628d470 /test | |
parent | c6281db8311345dbae895a498bd44b73600d4c0c (diff) | |
parent | 4e4854aabb4f3283972737440aa64dd221e7aeee (diff) | |
download | SCons-54b73e170a60275b7b343b0a89b439ae86bb63c4.zip SCons-54b73e170a60275b7b343b0a89b439ae86bb63c4.tar.gz SCons-54b73e170a60275b7b343b0a89b439ae86bb63c4.tar.bz2 |
Merged in gauravjuvekar/scons (pull request #427)
string-escape unicode characters while printing --tree
Diffstat (limited to 'test')
-rw-r--r-- | test/option--tree.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/option--tree.py b/test/option--tree.py index a50433c..a9618d8 100644 --- a/test/option--tree.py +++ b/test/option--tree.py @@ -51,6 +51,30 @@ scons: warning: The --debug=tree option is deprecated; please use --tree=all ins """, status = 0, match=TestSCons.match_re_dotall) + +# Test that unicode characters can be printed (escaped) with the --tree option +test.write('SConstruct', +""" +env = Environment() +env.Tool("textfile") +try: + # Python 2 + write = unichr(0xe7).encode('utf-8') +except NameError: + # Python 3 + # str is utf-8 by default + write = chr(0xe7) +env.Textfile("Foo", write) +""") + +test.run(arguments = '-Q --tree=all', + stdout = """Creating 'Foo.txt' ++-. + +-Foo.txt + | +-\\xc3\\xa7 + +-SConstruct +""", + status = 0) test.pass_test() # Local Variables: |