summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FSTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-02 13:11:42 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-02 13:11:42 (GMT)
commitf987fbf31938ce3009b89f1f62f880cdc2a511f4 (patch)
treef015a31b8b8f7b59fe1dac86b7f404424772d37e /src/engine/SCons/Node/FSTests.py
parent3451935a570c186d36e020b7d48cf2dd3dc2be0b (diff)
downloadSCons-f987fbf31938ce3009b89f1f62f880cdc2a511f4.zip
SCons-f987fbf31938ce3009b89f1f62f880cdc2a511f4.tar.gz
SCons-f987fbf31938ce3009b89f1f62f880cdc2a511f4.tar.bz2
Add children() methods for nodes.
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
-rw-r--r--src/engine/SCons/Node/FSTests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 1cffd8c..568022b 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -95,6 +95,18 @@ class FSTestCase(unittest.TestCase):
except:
raise
+ # Test Dir.children()
+ dir = fs.Dir('ddd')
+ fs.File('ddd/f1')
+ fs.File('ddd/f2')
+ fs.File('ddd/f3')
+ fs.Dir('ddd/d1')
+ fs.Dir('ddd/d1/f4')
+ fs.Dir('ddd/d1/f5')
+ kids = map(lambda x: x.path, dir.children())
+ kids.sort()
+ assert kids == ['ddd/d1/', 'ddd/f1', 'ddd/f2', 'ddd/f3']
+
# Test for sub-classing of node building.
global built_it