summaryrefslogtreecommitdiffstats
path: root/src/svnqt/tests/ckpath.cpp
blob: 64a57ca8442fd57f6d431b1107b282e622927662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "src/svnqt/path.hpp"
#include <iostream>

int main(int,char**)
{
    svn::Path pa("/test/foo/bar/");
    if (pa.path()!=TQString("/test/foo/bar")) {
        std::cout << "No cleanup of components" << std::endl;
        return -1;
    }
    pa.removeLast();
    if (pa.path()!=TQString("/test/foo")) {
        std::cout<<"removeLast didn't work." << std::endl;
        return -1;
    }
    unsigned j = 0;
    while (pa.length()>0) {
        std::cout << pa.path() << std::endl;
        pa.removeLast();
        ++j;
    }
    return 0;
}