From a6c11c1cc99fdf732337fbfc1f76ae6114051120 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 11 Aug 2011 14:53:58 +0000 Subject: [PATCH] Untabify k5_path test program git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25095 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/t_path.c | 82 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/util/support/t_path.c b/src/util/support/t_path.c index ebf3bde25..2ac91d8ec 100644 --- a/src/util/support/t_path.c +++ b/src/util/support/t_path.c @@ -128,63 +128,63 @@ main(void) size_t i; for (i = 0; i < sizeof(split_tests) / sizeof(*split_tests); i++) { - ipath = split_tests[i].path; + ipath = split_tests[i].path; #ifdef WINDOWS_PATHS - edirname = split_tests[i].win_dirname; - ebasename = split_tests[i].win_basename; + edirname = split_tests[i].win_dirname; + ebasename = split_tests[i].win_basename; #else - edirname = split_tests[i].posix_dirname; - ebasename = split_tests[i].posix_basename; + edirname = split_tests[i].posix_dirname; + ebasename = split_tests[i].posix_basename; #endif - assert(k5_path_split(ipath, NULL, NULL) == 0); - assert(k5_path_split(ipath, &dirname, NULL) == 0); - free(dirname); - assert(k5_path_split(ipath, NULL, &basename) == 0); - free(basename); - assert(k5_path_split(ipath, &dirname, &basename) == 0); - if (strcmp(dirname, edirname) != 0) { - fprintf(stderr, "Split test %d: dirname %s != expected %s\n", - (int)i, dirname, edirname); - status = 1; - } - if (strcmp(basename, ebasename) != 0) { - fprintf(stderr, "Split test %d: basename %s != expected %s\n", - (int)i, basename, ebasename); - status = 1; - } - free(dirname); - free(basename); + assert(k5_path_split(ipath, NULL, NULL) == 0); + assert(k5_path_split(ipath, &dirname, NULL) == 0); + free(dirname); + assert(k5_path_split(ipath, NULL, &basename) == 0); + free(basename); + assert(k5_path_split(ipath, &dirname, &basename) == 0); + if (strcmp(dirname, edirname) != 0) { + fprintf(stderr, "Split test %d: dirname %s != expected %s\n", + (int)i, dirname, edirname); + status = 1; + } + if (strcmp(basename, ebasename) != 0) { + fprintf(stderr, "Split test %d: basename %s != expected %s\n", + (int)i, basename, ebasename); + status = 1; + } + free(dirname); + free(basename); } for (i = 0; i < sizeof(join_tests) / sizeof(*join_tests); i++) { - path1 = join_tests[i].path1; - path2 = join_tests[i].path2; + path1 = join_tests[i].path1; + path2 = join_tests[i].path2; #ifdef WINDOWS_PATHS - ejoined = join_tests[i].win_result; + ejoined = join_tests[i].win_result; #else - ejoined = join_tests[i].posix_result; + ejoined = join_tests[i].posix_result; #endif - assert(k5_path_join(path1, path2, &joined) == 0); - if (strcmp(joined, ejoined) != 0) { - fprintf(stderr, "Join test %d: %s != expected %s\n", - (int)i, joined, ejoined); - status = 1; - } + assert(k5_path_join(path1, path2, &joined) == 0); + if (strcmp(joined, ejoined) != 0) { + fprintf(stderr, "Join test %d: %s != expected %s\n", + (int)i, joined, ejoined); + status = 1; + } free(joined); } for (i = 0; i < sizeof(isabs_tests) / sizeof(*isabs_tests); i++) { #ifdef WINDOWS_PATHS - eresult = isabs_tests[i].win_result; + eresult = isabs_tests[i].win_result; #else - eresult = isabs_tests[i].posix_result; + eresult = isabs_tests[i].posix_result; #endif - result = k5_path_isabs(isabs_tests[i].path); - if (result != eresult) { - fprintf(stderr, "isabs test %d: %d != expected %d\n", - (int)i, result, eresult); - status = 1; - } + result = k5_path_isabs(isabs_tests[i].path); + if (result != eresult) { + fprintf(stderr, "isabs test %d: %d != expected %d\n", + (int)i, result, eresult); + status = 1; + } } return status; -- 2.26.2