Add simple test for PBD::find_files_matching_pattern
This helped fix a silly cut and paste error in pbd/file_utils.cc so might as well included it.
This commit is contained in:
parent
31bceb7570
commit
24c40c0e88
@ -84,3 +84,15 @@ FilesystemTest::testCopyFileUTF8Filename ()
|
||||
CPPUNIT_ASSERT (PBD::copy_file (input_path, output_path));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FilesystemTest::testFindFilesMatchingPattern ()
|
||||
{
|
||||
vector<string> patch_files;
|
||||
|
||||
PBD::find_files_matching_pattern (patch_files, test_search_path (), "*PatchFile*");
|
||||
|
||||
CPPUNIT_ASSERT(test_search_path ().size() == 1);
|
||||
|
||||
CPPUNIT_ASSERT(patch_files.size() == 2);
|
||||
}
|
||||
|
@ -7,12 +7,13 @@ class FilesystemTest : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST (testPathIsWithin);
|
||||
CPPUNIT_TEST (testCopyFileASCIIFilename);
|
||||
CPPUNIT_TEST (testCopyFileUTF8Filename);
|
||||
CPPUNIT_TEST (testFindFilesMatchingPattern);
|
||||
CPPUNIT_TEST_SUITE_END ();
|
||||
|
||||
public:
|
||||
void testPathIsWithin ();
|
||||
void testCopyFileASCIIFilename ();
|
||||
void testCopyFileUTF8Filename ();
|
||||
|
||||
void testFindFilesMatchingPattern ();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user