diff options
author | Steven Knight <knight@baldmt.com> | 2002-05-02 13:40:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-05-02 13:40:38 (GMT) |
commit | 39d50eb2332228e827b56638877862f4c709a6bf (patch) | |
tree | 9043e61875931b89bcd8c235470838a19bd3a284 /test/Split.py | |
parent | 14b0749ef9a6232ad1375f750baf00e0fea14e56 (diff) | |
download | SCons-39d50eb2332228e827b56638877862f4c709a6bf.zip SCons-39d50eb2332228e827b56638877862f4c709a6bf.tar.gz SCons-39d50eb2332228e827b56638877862f4c709a6bf.tar.bz2 |
Add a Split() function (like argmunge()) in anticipation of removing the automatic white-space splitting from Builders in 0.08.
Diffstat (limited to 'test/Split.py')
-rw-r--r-- | test/Split.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/Split.py b/test/Split.py new file mode 100644 index 0000000..ee1a435 --- /dev/null +++ b/test/Split.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# +# Copyright (c) 2001, 2002 Steven Knight +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +test = TestSCons.TestSCons() + +test.write('SConstruct', """ +print Split('aaa') +print Split('bbb ccc') +print Split(['ddd', 'eee']) +SConscript('SConscript') +""") + +test.write('SConscript', """ +print Split('fff') +print Split('ggg hhh') +print Split(['iii', 'jjj']) +""") + +expect = """['aaa'] +['bbb', 'ccc'] +['ddd', 'eee'] +['fff'] +['ggg', 'hhh'] +['iii', 'jjj'] +""" + +test.run(stdout = expect) + +test.pass_test() |