From c1f586996733e9722ae896e73e50936e2a8cecf6 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 8 Jun 2020 12:21:53 +0300 Subject: [PATCH] tests: perform directory backslash-test only on Windows --- tests/unit/test_path.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_path.c b/tests/unit/test_path.c index 14442b091..bbe9653a4 100644 --- a/tests/unit/test_path.c +++ b/tests/unit/test_path.c @@ -149,7 +149,9 @@ SENTRY_TEST(path_directory) { sentry_path_t *path_1 = sentry__path_from_str("foo"); sentry_path_t *path_2 = sentry__path_from_str("foo/bar"); +#ifdef SENTRY_PLATFORM_WINDOWS sentry_path_t *path_3 = sentry__path_from_str("foo/bar\\baz"); +#endif // create single directory sentry__path_create_dir_all(path_1); @@ -166,13 +168,15 @@ SENTRY_TEST(path_directory) TEST_CHECK(!sentry__path_is_dir(path_2)); // create directories by path with forward slash and backward slashes +#ifdef SENTRY_PLATFORM_WINDOWS sentry__path_create_dir_all(path_3); TEST_CHECK(sentry__path_is_dir(path_3)); sentry__path_remove_all(path_3); TEST_CHECK(!sentry__path_is_dir(path_3)); + sentry__path_free(path_3); +#endif sentry__path_free(path_1); sentry__path_free(path_2); - sentry__path_free(path_3); }