ceph/branches/sage/mds/test/testfilepath.cc
sageweil 665688c9de new mds branch
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1543 29311d96-e01e-0410-9327-a35deaab8ce9
2007-07-23 21:48:13 +00:00

23 lines
437 B
C++

#include "include/filepath.h"
#include <iostream>
using namespace std;
int print(string s) {
filepath fp = s;
cout << "s = " << s << " filepath = " << fp << endl;
cout << " depth " << fp.depth() << endl;
for (int i=0; i<fp.depth(); i++) {
cout << "\t" << i << " " << fp[i] << endl;
}
}
int main() {
filepath p;
print("/home/sage");
print("a/b/c");
print("/a/b/c");
print("/a/b/c/");
print("/a/b/../d");
}