| 40 | private Q_SLOTS: |
| 41 | |
| 42 | void testFileRelPath() |
| 43 | { |
| 44 | FileAccessMoc mocFile, mocRoot, mocFile2; |
| 45 | |
| 46 | mocRoot.setEngine(new FileAccessJobHandlerMoc(&mocRoot)); |
| 47 | mocFile.setEngine(new FileAccessJobHandlerMoc(&mocFile)); |
| 48 | mocFile2.setEngine(new FileAccessJobHandlerMoc(&mocFile2)); |
| 49 | |
| 50 | //Check remote url. |
| 51 | mocRoot.setFile(u8"fish://i@0.0.0.0/root"); |
| 52 | QCOMPARE(mocRoot.fileRelPath(), u8""); |
| 53 | |
| 54 | mocFile.setFile(u8"fish://i@0.0.0.0/root/x"); |
| 55 | mocFile.setParent(&mocRoot); |
| 56 | QCOMPARE(mocFile.fileRelPath(), QStringLiteral("x")); |
| 57 | |
| 58 | mocFile2.setFile("fish://i@0.0.0.0/root/x/y"); |
| 59 | mocFile2.setParent(&mocFile); |
| 60 | QCOMPARE(mocFile2.fileRelPath(), QStringLiteral("x/y")); |
| 61 | } |
| 62 | |
| 63 | void testUrl() |
| 64 | { |
nothing calls this directly
no test coverage detected