diff options
author | Steven Knight <knight@baldmt.com> | 2003-06-14 07:04:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-06-14 07:04:50 (GMT) |
commit | 7414ccf0c3ddcdde49574a3a0e6f36c96908c549 (patch) | |
tree | c811f099b277f44a00e09339366a9a8f97b38df2 /src/engine/SCons/Tool/msvsTests.py | |
parent | ba5d88c5d08fc60d02eeeb65f85c6de9a95584c6 (diff) | |
download | SCons-7414ccf0c3ddcdde49574a3a0e6f36c96908c549.zip SCons-7414ccf0c3ddcdde49574a3a0e6f36c96908c549.tar.gz SCons-7414ccf0c3ddcdde49574a3a0e6f36c96908c549.tar.bz2 |
MSVS documentation, remove unnecessary exceptions, and restor escape() to its previous implementation. (Greg Spencer)
Diffstat (limited to 'src/engine/SCons/Tool/msvsTests.py')
-rw-r--r-- | src/engine/SCons/Tool/msvsTests.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py index 731cc2d..bd22177 100644 --- a/src/engine/SCons/Tool/msvsTests.py +++ b/src/engine/SCons/Tool/msvsTests.py @@ -228,6 +228,7 @@ regdata_67 = string.split(r''' "MediaPath"="C:\WINDOWS\Media" ''','\n') +regdata_none = [] class DummyEnv: def __init__(self, dict=None): @@ -411,7 +412,7 @@ class msvsTestCase(unittest.TestCase): def test_get_visual_studio_versions(self): """Test retrieval of the list of visual studio versions""" v1 = get_visualstudio_versions() - assert v1[0] == highest_version + assert not v1 or v1[0] == highest_version assert len(v1) == number_of_versions def test_get_msvs_install_dirs(self): @@ -441,6 +442,7 @@ if __name__ == "__main__": number_of_versions = 1 install_location1 = {'VSINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio', 'VCINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio\\VC98'} install_location2 = {} + print "Test MSVS 6 Registry" # print str(registry.root) if not unittest.TextTestRunner().run(suite).wasSuccessful(): sys.exit(1) @@ -451,6 +453,7 @@ if __name__ == "__main__": number_of_versions = 1 install_location1 = {'VSINSTALLDIR': 'C:\\VS6', 'VCINSTALLDIR': 'C:\\VS6\\VC98'} install_location2 = {} + print "Test Other MSVS 6 Registry" # print str(registry.root) if not unittest.TextTestRunner().run(suite).wasSuccessful(): sys.exit(1) @@ -462,6 +465,7 @@ if __name__ == "__main__": install_location1 = {'VSINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\', 'VCINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\Vc7\\'} install_location2 = {'VSINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\', 'VCINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\Vc7\\'} # print str(registry.root) + print "Test MSVS 6 & 7 Registry" if not unittest.TextTestRunner().run(suite).wasSuccessful(): sys.exit(1) @@ -472,5 +476,17 @@ if __name__ == "__main__": install_location1 = {'VSINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\', 'VCINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\Vc7\\'} install_location2 = {'VSINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\', 'VCINSTALLDIR': 'C:\\Program Files\\Microsoft Visual Studio .NET\\Vc7\\'} # print str(registry.root) + print "Test MSVS 7 Registry" + if not unittest.TextTestRunner().run(suite).wasSuccessful(): + sys.exit(1) + + registry = DummyRegistry(regdata_none) + default_version = '6.0' + highest_version = None + number_of_versions = 0 + install_location1 = {} + install_location2 = {} + # print str(registry.root) + print "Test Empty Registry" if not unittest.TextTestRunner().run(suite).wasSuccessful(): sys.exit(1) |