From 020cc61b53ef2a3f95c2a82ef86ef821706a2858 Mon Sep 17 00:00:00 2001 From: msheby Date: Wed, 8 Apr 2009 18:37:05 +0000 Subject: Add tests for new functions. --- src/path-test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/path-test.cpp') diff --git a/src/path-test.cpp b/src/path-test.cpp index c0bbce6..5d54a37 100644 --- a/src/path-test.cpp +++ b/src/path-test.cpp @@ -92,6 +92,12 @@ main(int argc, const char** argv) fprintf(stderr, "xx: \"%s\"\n", i->c_str()); assert(PathsAreEquivalent(PathMakeLocal(PathMakeCanonical(Path_7), "/tmp"), "fooo")); + string Path_8 = "tmp/foo/bar/ack"; + CreateDirectoriesInPath(Path_8); + assert(PathExists(Path_8)); + DeletePath(Path_8); + assert(!PathExists(Path_8)); + PathList_t InList, OutList; InList.push_back("tmp"); InList.push_back("Darwin"); @@ -120,6 +126,11 @@ main(int argc, const char** argv) cerr << "----------------------------------" << endl; + fsize_t free_space, total_space; + FreeSpaceForPath("/", free_space, total_space); + cerr << "Free space: " << free_space << endl; + cerr << "Total space: " << total_space << endl; + cerr << "OK" << endl; return 0; -- cgit v1.2.3