]> git.lyx.org Git - lyx.git/blob - src/support/tests/check_filetools.cpp
Use *.* to select all files in the file selection dialog on Windows. Using shortcuts...
[lyx.git] / src / support / tests / check_filetools.cpp
1 #include "../filetools.h"
2 #include "../FileName.h"
3
4 #include <iostream>
5
6
7 using namespace lyx::support;
8
9 using namespace std;
10
11 namespace lyx {
12         docstring const _(string const & s) { return from_ascii(s); }
13 }
14
15 void test_normalizePath()
16 {
17         cout << FileName("foo/../bar").absFilename() << endl;
18         cout << FileName("foo/./bar").absFilename() << endl;
19         cout << FileName("./foo/../bar").absFilename() << endl;
20         cout << FileName("./foo/./bar").absFilename() << endl;
21         cout << FileName("/foo/../bar").absFilename() << endl;
22         cout << FileName("/foo/./bar").absFilename() << endl;
23         cout << FileName("foo//bar").absFilename() << endl;
24         cout << FileName("./foo//bar").absFilename() << endl;
25         cout << FileName("/foo//bar").absFilename() << endl;
26 }
27
28 int main()
29 {
30         test_normalizePath();
31 }