aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/tests/ansi/strverscmp.c
blob: d6501a1ef362e36bc7a64a778489d1f5da26fd5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <string.h>
#include <stdlib.h>
#include <assert.h>

int main() {
   int res;

   res = strverscmp("jan1", "jan10");
   assert(res < 0);

   res = strverscmp("jan11", "jan10");
   assert(res > 0);

   res = strverscmp("jan1", "jan1");
   assert(res == 0);
}