aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-07-30 01:25:30 +0200
committerSimon Warta <[email protected]>2017-07-30 01:25:30 +0200
commitd4bd603b061a46ff47cfc6ce992ded4b229b26d6 (patch)
tree9c0ad5f6bdb50a29089013dd8d588562f5b6aadd /src/scripts
parent436c1c99adc505d68ebd2674345d3ffc110bf2f6 (diff)
Use _MSC_VER to get MSVC version
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/python_uniitests.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/scripts/python_uniitests.py b/src/scripts/python_uniitests.py
index 4f8bc42b5..f7b1bc97e 100755
--- a/src/scripts/python_uniitests.py
+++ b/src/scripts/python_uniitests.py
@@ -41,7 +41,7 @@ class CompilerDetection(unittest.TestCase):
compiler_out = ""
self.assertEqual(detector.version_from_compiler_output(compiler_out), None)
- compiler_out = "Compiler Version 1900242131. for x86"
+ compiler_out = "Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86"
self.assertEqual(detector.version_from_compiler_output(compiler_out), None)
def test_gcc_version(self):
@@ -84,19 +84,9 @@ Selected multilib: .;@m64"""
def test_msvc_version(self):
detector = CompilerDetector("msvc", "cl.exe", "windows")
- compiler_out = """Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86
-Copyright (C) Microsoft Corporation. All rights reserved.
+ compiler_out = """msvc_version.c
-usage: cl [ option... ] filename... [ /link linkoption... ]
-"""
- self.assertEqual(detector.version_from_compiler_output(compiler_out), "2015")
-
- def test_msvc_version_german(self):
- detector = CompilerDetector("msvc", "cl.exe", "windows")
- compiler_out = """Microsoft (R) C/C++-Optimierungscompiler Version 19.00.24213.1 für x86
-Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
-
-Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]
+1900
"""
self.assertEqual(detector.version_from_compiler_output(compiler_out), "2015")