summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-30 11:47:55 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-30 11:47:55 +0100
commitbe5b25b18a56c690a71d7241dfc680c0b5375e1b (patch)
tree2e58bb1fe3dc395bc4247b8ecc4becf09b346e2f
parent33628e1f35ab1eb593391e87faaf9115b203c9b3 (diff)
added a unit test for absolute paths.
-rw-r--r--test/plugins/filesystem/FileLocatorTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/plugins/filesystem/FileLocatorTest.cpp b/test/plugins/filesystem/FileLocatorTest.cpp
index 75d9f33..87a9223 100644
--- a/test/plugins/filesystem/FileLocatorTest.cpp
+++ b/test/plugins/filesystem/FileLocatorTest.cpp
@@ -142,6 +142,17 @@ TEST(FileLocator, locate)
assert_not_located(locator, "c.txt", "", ResourceType::SCRIPT);
}
+TEST(FileLocator, locateAbsolute){
+ FileLocator locator;
+ // construct the absolute path by utilizing SpecialPaths and
+ fs::path testdataDir {SpecialPaths::getDebugTestdataDir()};
+ fs::path absolute = fs::canonical(testdataDir);
+ absolute /= "filesystem";
+ absolute /= "a.txt";
+ Resource resA;
+ ASSERT_TRUE(locator.locate(resA, absolute.string()));
+}
+
TEST(FileLocator, locateRelative)
{
FileLocator locator;