diff options
author | Dirk Baechle <dl9obn@darc.de> | 2014-11-05 13:56:56 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2014-11-05 13:56:56 (GMT) |
commit | ad21677e236fb53db18f42402ec7f024f3e58a36 (patch) | |
tree | 2b3a9c9cf003d6627f278117b49fc8e60ba49c74 /src/engine/SCons/Node/FSTests.py | |
parent | 9866a7f445bb30e8cb16cc1f9c0225dfc1061ff5 (diff) | |
download | SCons-ad21677e236fb53db18f42402ec7f024f3e58a36.zip SCons-ad21677e236fb53db18f42402ec7f024f3e58a36.tar.gz SCons-ad21677e236fb53db18f42402ec7f024f3e58a36.tar.bz2 |
- added new method rentry_exists_on_disk (check for physical files/dirs)
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
-rw-r--r-- | src/engine/SCons/Node/FSTests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index c4dc2ce..0326717 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -2052,6 +2052,32 @@ class DirTestCase(_tempdirTestCase): if os.path.normcase("TeSt") != os.path.normpath("TeSt") or sys.platform == "cygwin": assert d.entry_exists_on_disk('case-insensitive') + def test_rentry_exists_on_disk(self): + """Test the Dir.rentry_exists_on_disk() method + """ + test = self.test + + does_not_exist = self.fs.Dir('does_not_exist') + assert not does_not_exist.rentry_exists_on_disk('foo') + + test.subdir('d') + test.write(['d', 'exists'], "d/exists\n") + test.write(['d', 'Case-Insensitive'], "d/Case-Insensitive\n") + + test.subdir('r') + test.write(['r', 'rexists'], "r/rexists\n") + + d = self.fs.Dir('d') + r = self.fs.Dir('r') + d.addRepository(r) + + assert d.rentry_exists_on_disk('exists') + assert d.rentry_exists_on_disk('rexists') + assert not d.rentry_exists_on_disk('does_not_exist') + + if os.path.normcase("TeSt") != os.path.normpath("TeSt") or sys.platform == "cygwin": + assert d.rentry_exists_on_disk('case-insensitive') + def test_srcdir_list(self): """Test the Dir.srcdir_list() method """ |