Salome HOME
accept range 'version_1_0_0_to_2_0_0' as '_from_1_0_0_to_2_0_0'
[tools/sat.git] / test / test_021_versionMinorMajorPatch.py
index 6fbb0612713a8866690a4babf8d6c7a0c53261e6..2cecf03642ee4b5efbccabc454c0c264bac860eb 100755 (executable)
@@ -173,7 +173,9 @@ toto_from_1_to_2
    _from_1.0.0_to_2.0.0
 _from_1_0.  0_to_  2.0_0   
 _from_V1.0.0_to_2.0.0
-_from_version_1.0.0_to_2.0.0""".split("\n")
+_from_version_1.0.0_to_2.0.0
+version_1.0.0_to_2.0.0
+VERSION_1.0.0_to_2.0.0""".split("\n")
 
     for a in tests:
       # print("test '%s'" % a)
@@ -221,6 +223,8 @@ toto_from_2""".split("\n")
     with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("_from__to_")
     with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("toto_from__to_")
     with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("toto_from_123_to_")
+    with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("version_123_to_")
+    with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("version_to_")
 
     # min > max does matter
     with self.assertRaises(Exception): VMMP.getRange_majorMinorPatch("_from_3_to_2")