diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
commit | df5520aa2dae5b3ce7abf8733dcdd152898af163 (patch) | |
tree | 00d3047bfb14f682bfb5a21010c731ed649bfed7 /app/bin/unittest/pathstest.c | |
parent | df247efec654e512242e4f4f1b0212034f9e01fe (diff) | |
parent | ec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff) |
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
Diffstat (limited to 'app/bin/unittest/pathstest.c')
-rw-r--r-- | app/bin/unittest/pathstest.c | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/app/bin/unittest/pathstest.c b/app/bin/unittest/pathstest.c index 3ee830e..eccba24 100644 --- a/app/bin/unittest/pathstest.c +++ b/app/bin/unittest/pathstest.c @@ -32,6 +32,9 @@ #define DEFAULTPATH "/Default/Path" #endif //WINDOWS + +// Dummy functions to satisfy the linker + void wPrefSetString(const char *section, const char *key, const char *value) {} @@ -51,6 +54,11 @@ const char *wGetUserHomeDir(void) return(DEFAULTPATH); } +void AbortProg(const char *a, const char *b, int d, const char *c) +{ + return; +} + #include "../paths.c" static void SetGetPath(void **state) @@ -67,7 +75,7 @@ static void SetGetPath(void **state) SetCurrentPath("Test", TESTFILE2); string = GetCurrentPath("Test"); - assert_string_equal(string, TESTPATH2); + assert_string_equal(string, TESTPATH2); } static void Makepath(void **state) @@ -76,38 +84,38 @@ static void Makepath(void **state) char *path; #ifdef WINDOWS - MakeFullpath(&path, - "C:", - TESTRELATIVEPATH, - TESTFILENAME, - NULL); + MakeFullpath(&path, + "C:", + TESTRELATIVEPATH, + TESTFILENAME, + NULL); - assert_string_equal(path, "C:" TESTRELATIVEPATH "\\" TESTFILENAME); + assert_string_equal(path, "C:" TESTRELATIVEPATH "\\" TESTFILENAME); #else - MakeFullpath(&path, - TESTRELATIVEPATH, - TESTFILENAME, - NULL); + MakeFullpath(&path, + TESTRELATIVEPATH, + TESTFILENAME, + NULL); - assert_string_equal(path, TESTRELATIVEPATH "/" TESTFILENAME); + assert_string_equal(path, TESTRELATIVEPATH "/" TESTFILENAME); #endif // WINDOWS free(path); #ifdef WINDOWS MakeFullpath(&path, - "C:", - "test", - "\\subdir", - TESTFILENAME, - NULL); + "C:", + "test", + "\\subdir", + TESTFILENAME, + NULL); assert_string_equal(path, "C:test\\subdir\\" TESTFILENAME); #else MakeFullpath(&path, - "test", - "/subdir", - TESTFILENAME, - NULL); + "test", + "/subdir", + TESTFILENAME, + NULL); assert_string_equal(path, "test/subdir/" TESTFILENAME); #endif // WINDOWS @@ -118,9 +126,9 @@ static void Makepath(void **state) int main(void) { - const struct CMUnitTest tests[] = { + const struct CMUnitTest tests[] = { cmocka_unit_test(SetGetPath), cmocka_unit_test(Makepath), - }; - return cmocka_run_group_tests(tests, NULL, NULL); + }; + return cmocka_run_group_tests(tests, NULL, NULL); } |