diff options
author | Paul Tipei <paul.bogdan.tipei@intel.com> | 2020-02-19 13:56:32 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-03-24 16:08:35 (GMT) |
commit | 35de9e8ffb17706816d3f9bb9751297f4beb87e1 (patch) | |
tree | f54bf0ff63db58661e9e302ceb7ff7fd93cf63d9 | |
parent | 8b3a91a8ad809ac6ea24d6834f4499b0cd1175d8 (diff) | |
download | SCons-35de9e8ffb17706816d3f9bb9751297f4beb87e1.zip SCons-35de9e8ffb17706816d3f9bb9751297f4beb87e1.tar.gz SCons-35de9e8ffb17706816d3f9bb9751297f4beb87e1.tar.bz2 |
added the test for the new implemented feature
-rw-r--r-- | test/option--tree.py | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/test/option--tree.py b/test/option--tree.py index 1b34176..d44b602 100644 --- a/test/option--tree.py +++ b/test/option--tree.py @@ -41,7 +41,7 @@ test.run(arguments='-Q --tree=foofoo', stderr="""usage: scons [OPTION] [TARGET] ... SCons Error: `foofoo' is not a valid --tree option type, try: - all, derived, prune, status + all, derived, prune, status, linedraw """, status=2) @@ -76,6 +76,39 @@ expected = """Creating 'Foo.txt' test.run(arguments='-Q --tree=all', stdout=expected, status=0) + +#Tests the new command line option "linedraw" +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("LineDraw", write) +""") + +if sys.version_info.major < 3: + py23_char = unichr(0xe7).encode('utf-8') +else: + py23_char = chr(0xe7) + +expected = """Creating 'LineDraw.txt' +└─┬. + ├─┬LineDraw.txt + │ └─""" + py23_char + """ + └─SConstruct +""" + + +test.run(arguments='-Q --tree=linedraw', + stdout=expected, + status=0) + test.pass_test() # Local Variables: |