X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Ftests%2Fcheck_filetools.cpp;h=ad657facb100bc63be19600beb70c772e3f55e5f;hb=57b69a5efddf9f3c148007322f00dad6c253a2ed;hp=4859f8db1848e5bdab14a63a7577d6ae735d398c;hpb=15b104953a57a869002236c1f020a219bbd82402;p=lyx.git diff --git a/src/support/tests/check_filetools.cpp b/src/support/tests/check_filetools.cpp index 4859f8db18..ad657facb1 100644 --- a/src/support/tests/check_filetools.cpp +++ b/src/support/tests/check_filetools.cpp @@ -1,4 +1,7 @@ +#include + #include "../filetools.h" +#include "../FileName.h" #include @@ -7,21 +10,11 @@ using namespace lyx::support; using namespace std; -namespace lyx { - docstring const _(string const & s) { return from_ascii(s); } -} - void test_normalizePath() { - cout << normalizePath("foo/../bar") << endl; - cout << normalizePath("foo/./bar") << endl; - cout << normalizePath("./foo/../bar") << endl; - cout << normalizePath("./foo/./bar") << endl; - cout << normalizePath("/foo/../bar") << endl; - cout << normalizePath("/foo/./bar") << endl; - cout << normalizePath("foo//bar") << endl; - cout << normalizePath("./foo//bar") << endl; - cout << normalizePath("/foo//bar") << endl; + cout << FileName("/foo/../bar").absFileName() << endl; + cout << FileName("/foo/./bar").absFileName() << endl; + cout << FileName("/foo//bar").absFileName() << endl; } int main()