summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Node/FSTests.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-06-21 07:55:15 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-06-21 07:55:15 +0200
commitf7e5d2b46b03cc4bc09c38f7e0873378bb9c3b78 (patch)
tree583fe67e23e2e7f8737b77d1834633086283c393 /src/engine/SCons/Node/FSTests.py
parenta2795b63dd02ecddd8a0109dcc1b64108f68eace (diff)
Imported Upstream version 2.3.5upstream/2.3.5
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
-rw-r--r--src/engine/SCons/Node/FSTests.py30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index ada8b8f..45d638a 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,7 +22,7 @@
#
from __future__ import division
-__revision__ = "src/engine/SCons/Node/FSTests.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Node/FSTests.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import SCons.compat
@@ -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
"""