diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-11-29 16:53:56 +0700 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2014-12-03 17:31:04 +0700 |
commit | aed58d6f39f77d9d0426e86d4e6cd6b81ebadee6 (patch) | |
tree | d0154eb07e73fd6762068ac7c33970229ee90ce9 /libs/pbd | |
parent | 61f9ca9f3c3fb8283ebc67c39f9083730511488b (diff) |
Use test_output_directory() in pbd filesystem test
This prevents directory being created in pwd and means deletion of
directory is unnecessary
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/test/filesystem_test.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/pbd/test/filesystem_test.cc b/libs/pbd/test/filesystem_test.cc index 59475ff644..781e2bdafe 100644 --- a/libs/pbd/test/filesystem_test.cc +++ b/libs/pbd/test/filesystem_test.cc @@ -1,5 +1,8 @@ #include "filesystem_test.h" +#include <glib.h> +#include <glib/gstdio.h> + #include <unistd.h> #include <stdlib.h> @@ -19,7 +22,9 @@ void FilesystemTest::testPathIsWithin () { #ifndef PLATFORM_WINDOWS - system ("rm -r foo"); + string output_path = test_output_directory ("testPathIsWithin"); + CPPUNIT_ASSERT (g_chdir (output_path.c_str()) == 0); + CPPUNIT_ASSERT (g_mkdir_with_parents ("foo/bar/baz", 0755) == 0); CPPUNIT_ASSERT (PBD::path_is_within ("foo/bar/baz", "foo/bar/baz")); |