diff options
Diffstat (limited to 'lib/mlibc/tests/ansi/strverscmp.c')
-rw-r--r-- | lib/mlibc/tests/ansi/strverscmp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/mlibc/tests/ansi/strverscmp.c b/lib/mlibc/tests/ansi/strverscmp.c new file mode 100644 index 0000000..d6501a1 --- /dev/null +++ b/lib/mlibc/tests/ansi/strverscmp.c @@ -0,0 +1,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); +} |