diff options
Diffstat (limited to 'gl/tests/test-strverscmp.c')
-rw-r--r-- | gl/tests/test-strverscmp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gl/tests/test-strverscmp.c b/gl/tests/test-strverscmp.c index e5a6bb10f8..0cafe08fb1 100644 --- a/gl/tests/test-strverscmp.c +++ b/gl/tests/test-strverscmp.c @@ -41,5 +41,19 @@ main (void) ASSERT (strverscmp ("09", "0") < 0); ASSERT (strverscmp ("9", "10") < 0); ASSERT (strverscmp ("0a", "0") > 0); + + /* From glibc bug 9913. */ + { + static char const a[] = "B0075022800016.gbp.corp.com"; + static char const b[] = "B007502280067.gbp.corp.com"; + static char const c[] = "B007502357019.GBP.CORP.COM"; + ASSERT (strverscmp (a, b) < 0); + ASSERT (strverscmp (b, c) < 0); + ASSERT (strverscmp (a, c) < 0); + ASSERT (strverscmp (b, a) > 0); + ASSERT (strverscmp (c, b) > 0); + ASSERT (strverscmp (c, a) > 0); + } + return 0; } |