mirror of
https://github.com/likle/cwalk.git
synced 2026-10-28 09:44:01 +00:00
added two simple tests
This commit is contained in:
1 parent
6de23d70c1
commit
28ab154bae
2 files changed
+22
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user