diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-03 10:03:40 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-03 10:07:18 +0100 |
commit | 6c55425a7de23a71d0abc3137f0015e878188bae (patch) | |
tree | e5183f130ea90cce0a11637afb9e40d09556aac3 /tools/tests/test.h | |
parent | 3acf285916968a05ea42b3ef0f9654a33e308da7 (diff) |
Windows doesn't support symlinks, chmod, or atomic renames
* Don't create symlinks on windows
* No atomic renames, so delete and then rename
* Make sure to close files before unlinking on windows
* No chmod permissions on windows
Diffstat (limited to 'tools/tests/test.h')
-rw-r--r-- | tools/tests/test.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/tests/test.h b/tools/tests/test.h index 7cf2492..82b8b2c 100644 --- a/tools/tests/test.h +++ b/tools/tests/test.h @@ -221,6 +221,8 @@ void test_check_data_msg (CuTest *tc, const void *refdata, long reflen); +#ifdef OS_UNIX + void test_check_symlink_msg (CuTest *tc, const char *file, int line, @@ -228,6 +230,8 @@ void test_check_symlink_msg (CuTest *tc, const char *name, const char *destination); +#endif /* OS_UNIX */ + p11_dict * test_check_directory_files (const char *file, ...) GNUC_NULL_TERMINATED; @@ -243,9 +247,13 @@ void test_check_directory_msg (CuTest *tc, #define test_check_data(tc, directory, name, data, length) \ (test_check_data_msg (tc, __FILE__, __LINE__, directory, name, data, length)) +#ifdef OS_UNIX + #define test_check_symlink(tc, directory, name, destination) \ (test_check_symlink_msg (tc, __FILE__, __LINE__, directory, name, destination)) +#endif /* OS_UNIX */ + #define test_check_directory(tc, directory, files) \ (test_check_directory_msg (tc, __FILE__, __LINE__, directory, \ test_check_directory_files files)) |