From bbb675d4f522321a9a65eaa710785b3551582fd9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 14 Nov 2014 12:45:47 +0200 Subject: Some more compareVersionStrings() tests Change-Id: I5b9dc45352afd63dae4c3952d9647e6e3ec98ef4 --- comphelper/qa/string/test_string.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 6100a777f63a..d1831cee734a 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -443,6 +443,10 @@ void TestString::testCompareVersionStrings() TEST("1.001", "1.1", -1); TEST("1.001", "1.010", -1); TEST("1.2.a", "1.2.b", -1); + TEST("1.2.3 (foo,bar)", "1.2.9", -1); + TEST("1.2.3 (foo,bar)", "1.2.4 (foo,bar)", -1); + TEST("1.2.3 (foo,bar)", "1.2.3 (foo)", 1); // Neither ordering makes any more sense than the other here, as long as they compare unequal + TEST("1.2.3 (foo,bar)", "1.2.2 (foo,bar)", 1); #undef TEST } -- cgit