]> git.lyx.org Git - lyx.git/blobdiff - src/support/tests/check_filetools.cpp
remove unnecessary Carbon include
[lyx.git] / src / support / tests / check_filetools.cpp
index 4859f8db1848e5bdab14a63a7577d6ae735d398c..7da548abd762a75219fd53b8b75fb76e8f0edab5 100644 (file)
@@ -1,4 +1,7 @@
+#include <config.h>
+
 #include "../filetools.h"
+#include "../FileName.h"
 
 #include <iostream>
 
@@ -8,20 +11,20 @@ using namespace lyx::support;
 using namespace std;
 
 namespace lyx {
+       // Dummy LyXRC support
+       struct LyXRC { string icon_set; } lyxrc;
+
+       // Keep the linker happy on Windows
+       void lyx_exit(int) {}
+
        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()