added two simple tests

This commit is contained in:
Leonard Iklé committed 2021-09-27 10:34:02 +02:00
1 parent 6de23d70c1
commit 28ab154bae
2 files changed
+22

No files matched your search

+2
View File
@@ -139,6 +139,8 @@ if(ENABLE_TESTS)
create_test(DEFAULT is_absolute absolute_drive)
create_test(DEFAULT is_absolute relative_drive)
create_test(DEFAULT is_absolute relative_windows)
create_test(DEFAULT is_absolute root)
create_test(DEFAULT is_absolute dir)
create_test(DEFAULT is_relative absolute)
create_test(DEFAULT is_relative unc)
create_test(DEFAULT is_relative device_unc)
+20
View File
@@ -143,3 +143,23 @@ int is_absolute_absolute()
return EXIT_SUCCESS;
}
int is_absolute_root()
{
cwk_path_set_style(CWK_STYLE_UNIX);
if (!cwk_path_is_absolute("/")) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
int is_absolute_dir()
{
cwk_path_set_style(CWK_STYLE_UNIX);
if (!cwk_path_is_absolute("/dir")) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}