summaryrefslogtreecommitdiffstats
path: root/test/option--tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/option--tree.py')
-rw-r--r--test/option--tree.py24
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: