| 681 | } |
| 682 | |
| 683 | void test_path_depth() |
| 684 | { |
| 685 | QCOMPARE(FS::pathDepth(""), 0); |
| 686 | QCOMPARE(FS::pathDepth("."), 0); |
| 687 | QCOMPARE(FS::pathDepth("foo.txt"), 0); |
| 688 | QCOMPARE(FS::pathDepth("./foo.txt"), 0); |
| 689 | QCOMPARE(FS::pathDepth("./bar/foo.txt"), 1); |
| 690 | QCOMPARE(FS::pathDepth("../bar/foo.txt"), 0); |
| 691 | QCOMPARE(FS::pathDepth("/bar/foo.txt"), 1); |
| 692 | QCOMPARE(FS::pathDepth("baz/bar/foo.txt"), 2); |
| 693 | QCOMPARE(FS::pathDepth("/baz/bar/foo.txt"), 2); |
| 694 | QCOMPARE(FS::pathDepth("./baz/bar/foo.txt"), 2); |
| 695 | QCOMPARE(FS::pathDepth("/baz/../bar/foo.txt"), 1); |
| 696 | } |
| 697 | |
| 698 | void test_path_trunc() |
| 699 | { |
nothing calls this directly
no test coverage detected