diff --git a/src/tests/testio.c b/src/tests/testio.c index 75338092..bed180b1 100644 --- a/src/tests/testio.c +++ b/src/tests/testio.c @@ -32,6 +32,7 @@ #include "tests.h" #include "../struct.h" #include "../io.h" +#include "../realpath.h" #include "../gfx2mem.h" #include "../gfx2log.h" @@ -154,6 +155,7 @@ int Test_Read_Write_dword(void) Remove_path(path); return 1; } + int Test_Read_Write_bytes(void) { char path[256]; @@ -221,3 +223,18 @@ int Test_Read_Write_bytes(void) Remove_path(path); return 1; } + +int Test_Realpath(void) +{ + char * path; + + path = Realpath(tmpdir, NULL); + if (path == NULL) + { + GFX2_Log(GFX2_ERROR, "Realpath(\"%s\") returned NULL\n", tmpdir); + return 0; + } + GFX2_Log(GFX2_DEBUG, "Realpath(\"%s\") returned \"%s\"\n", tmpdir, path); + free(path); + return 1; +} diff --git a/src/tests/testlist.h b/src/tests/testlist.h index daae2f8b..d5c97a17 100644 --- a/src/tests/testlist.h +++ b/src/tests/testlist.h @@ -5,6 +5,7 @@ TEST(Read_Write_byte) TEST(Read_Write_word) TEST(Read_Write_dword) TEST(Read_Write_bytes) +TEST(Realpath) TEST(MOTO_MAP_pack) TEST(CPC_compare_colors)