| 730 | } |
| 731 | |
| 732 | void test_path_depth() |
| 733 | { |
| 734 | QCOMPARE(FS::pathDepth(""), 0); |
| 735 | QCOMPARE(FS::pathDepth("."), 0); |
| 736 | QCOMPARE(FS::pathDepth("foo.txt"), 0); |
| 737 | QCOMPARE(FS::pathDepth("./foo.txt"), 0); |
| 738 | QCOMPARE(FS::pathDepth("./bar/foo.txt"), 1); |
| 739 | QCOMPARE(FS::pathDepth("../bar/foo.txt"), 0); |
| 740 | QCOMPARE(FS::pathDepth("/bar/foo.txt"), 1); |
| 741 | QCOMPARE(FS::pathDepth("baz/bar/foo.txt"), 2); |
| 742 | QCOMPARE(FS::pathDepth("/baz/bar/foo.txt"), 2); |
| 743 | QCOMPARE(FS::pathDepth("./baz/bar/foo.txt"), 2); |
| 744 | QCOMPARE(FS::pathDepth("/baz/../bar/foo.txt"), 1); |
| 745 | } |
| 746 | |
| 747 | void test_path_trunc() |
| 748 | { |
nothing calls this directly
no test coverage detected