Skip to content

Commit

Permalink
tests: perform directory backslash-test only on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixaill committed Jun 8, 2020
1 parent b3863f5 commit c1f5869
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/unit/test_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

0 comments on commit c1f5869

Please sign in to comment.