summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/UtilTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-07-30 17:00:27 (GMT)
committerSteven Knight <knight@baldmt.com>2004-07-30 17:00:27 (GMT)
commit3bdcea46577a5ea16cd20d201fe54cdadf5153ee (patch)
tree30440ef5750597fb8bec24b9e38259f30c2114fd /src/engine/SCons/UtilTests.py
parent31af139b8a20b975430974a638e957b61cd4cf23 (diff)
downloadSCons-3bdcea46577a5ea16cd20d201fe54cdadf5153ee.zip
SCons-3bdcea46577a5ea16cd20d201fe54cdadf5153ee.tar.gz
SCons-3bdcea46577a5ea16cd20d201fe54cdadf5153ee.tar.bz2
Treat file extensions with all digits as part of the base name. (Gary Oberbrunne)
Diffstat (limited to 'src/engine/SCons/UtilTests.py')
-rw-r--r--src/engine/SCons/UtilTests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py
index 713f522..1bce1af 100644
--- a/src/engine/SCons/UtilTests.py
+++ b/src/engine/SCons/UtilTests.py
@@ -1509,6 +1509,21 @@ class UtilTestCase(unittest.TestCase):
r = adjustixes('dir/file', 'pre-', '-suf')
assert r == os.path.join('dir', 'pre-file-suf'), r
+ def test_containsAny(self):
+ """Test the containsAny() function"""
+ assert containsAny('*.py', '*?[]')
+ assert not containsAny('file.txt', '*?[]')
+
+ def test_containsAll(self):
+ """Test the containsAll() function"""
+ assert containsAll('43221', '123')
+ assert not containsAll('134', '123')
+
+ def test_containsOnly(self):
+ """Test the containsOnly() function"""
+ assert containsOnly('.83', '0123456789.')
+ assert not containsOnly('43221', '123')
+
if __name__ == "__main__":
suite = unittest.makeSuite(UtilTestCase, 'test_')
if not unittest.TextTestRunner().run(suite).wasSuccessful():