aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/realpath_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/util/realpath_TEST.cc')
-rw-r--r--paludis/util/realpath_TEST.cc47
1 files changed, 24 insertions, 23 deletions
diff --git a/paludis/util/realpath_TEST.cc b/paludis/util/realpath_TEST.cc
index 46a33d5..6f573ba 100644
--- a/paludis/util/realpath_TEST.cc
+++ b/paludis/util/realpath_TEST.cc
@@ -18,7 +18,8 @@
*/
#include <paludis/util/realpath.hh>
-#include <paludis/util/fs_entry.hh>
+#include <paludis/util/fs_path.hh>
+#include <paludis/util/fs_error.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
@@ -32,35 +33,35 @@ namespace test_cases
{
RealpathWithCurrentAndRootTest() : TestCase("realpath_with_current_and_root") {}
- FSEntry resolve(const FSEntry & symlink, const FSEntry & root)
+ FSPath resolve(const FSPath & symlink, const FSPath & root)
{
- return realpath_with_current_and_root(FSEntry((root / symlink).readlink()), symlink.dirname(), root);
+ return realpath_with_current_and_root(FSPath((root / symlink).readlink()), symlink.dirname(), root);
}
void run()
{
- FSEntry root("realpath_TEST_dir");
+ FSPath root("realpath_TEST_dir");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libfoo.so"), root), "/usr/lib64/libfoo.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libbar.so"), root), "/usr/lib64/libbar.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libbaz.so"), root), "/usr/lib64/libbaz.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libxyzzy.so"), root), "/usr/lib64/libxyzzy.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libplugh.so"), root), "/usr/lib64/libplugh.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libplover.so"), root), "/usr/lib64/libplover.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libblast.so"), root), "/usr/lib64/libblast.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libquux.so"), root), "/usr/lib64/libquux.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libnarf.so"), root), "/usr/lib64/libnarf.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libblech.so"), root), "/usr/lib64/libblech.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libstab.so"), root), "/usr/lib64/libstab.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libsnark.so"), root), "/usr/lib64/libsnark.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libfool.so"), root), "/usr/lib32/libfool.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libbarf.so"), root), "/usr/lib64/barf/libbarf.so.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libblip.so"), root), "/usr/lib64/libblip.so.1.0.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/libpoing.so"), root), "/usr/lib64/libpoing.so.1.0.1");
- TEST_CHECK_STRINGIFY_EQUAL(resolve(FSEntry("/usr/lib64/x/liby.so"), root), "/usr/lib64/x/liby.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libfoo.so"), root), "/usr/lib64/libfoo.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libbar.so"), root), "/usr/lib64/libbar.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libbaz.so"), root), "/usr/lib64/libbaz.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libxyzzy.so"), root), "/usr/lib64/libxyzzy.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libplugh.so"), root), "/usr/lib64/libplugh.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libplover.so"), root), "/usr/lib64/libplover.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libblast.so"), root), "/usr/lib64/libblast.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libquux.so"), root), "/usr/lib64/libquux.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libnarf.so"), root), "/usr/lib64/libnarf.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libblech.so"), root), "/usr/lib64/libblech.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libstab.so"), root), "/usr/lib64/libstab.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libsnark.so"), root), "/usr/lib64/libsnark.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libfool.so"), root), "/usr/lib32/libfool.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libbarf.so"), root), "/usr/lib64/barf/libbarf.so.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libblip.so"), root), "/usr/lib64/libblip.so.1.0.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/libpoing.so"), root), "/usr/lib64/libpoing.so.1.0.1");
+ TEST_CHECK_STRINGIFY_EQUAL(resolve(FSPath("/usr/lib64/x/liby.so"), root), "/usr/lib64/x/liby.so.1");
- TEST_CHECK_THROWS(resolve(FSEntry("/usr/lib64/libouch.so"), root),FSError);
- TEST_CHECK_THROWS(resolve(FSEntry("/usr/lib64/libping.so"), root),FSError);
+ TEST_CHECK_THROWS(resolve(FSPath("/usr/lib64/libouch.so"), root), FSError);
+ TEST_CHECK_THROWS(resolve(FSPath("/usr/lib64/libping.so"), root), FSError);
}
} realpath_with_current_and_root_test;
}