t: make many tests depend less on the refs being files
[git/git-svn.git] / t / helper / test-strcmp-offset.c
blobe159c9a127f6854541ab497c8fd4b6efb9d4ea39
1 #include "cache.h"
3 int cmd_main(int argc, const char **argv)
5 int result;
6 size_t offset;
8 if (!argv[1] || !argv[2])
9 die("usage: %s <string1> <string2>", argv[0]);
11 result = strcmp_offset(argv[1], argv[2], &offset);
14 * Because different CRTs behave differently, only rely on signs
15 * of the result values.
17 result = (result < 0 ? -1 :
18 result > 0 ? 1 :
19 0);
20 printf("%d %"PRIuMAX"\n", result, (uintmax_t)offset);
21 return 0;