Merge pull request #25 from remia/fix/non-pod-variadic-warning
[asdcplib.git] / src / path-test.cpp
index 5d54a37cff8d0c4b75107ea0a50fb5d126b770ec..f3cb131b7aa6c4ef72e895099cb2afa8cddd2d14 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2004-2008, John Hurst
+Copyright (c) 2004-2009, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -60,6 +60,10 @@ main(int argc, const char** argv)
 
   string Path_4 = ComponentsToPath(PathList_3);
   string Path_5 = PathMakeAbsolute(Path_4);
+
+  fprintf(stderr, "PathMakeAbsolute in: %s\n", Path_4.c_str());
+  fprintf(stderr, "PathMakeAbsolute out: %s\n", Path_5.c_str());
+
   string Path_6 = ComponentsToAbsolutePath(PathList_3);
   assert(Path_3 == Path_6);
   assert(PathsAreEquivalent(Path_3, Path_6));
@@ -107,8 +111,15 @@ main(int argc, const char** argv)
   FindInPaths(PathMatchAny(), InList, OutList);
   PathList_t::iterator pi;
 
-  for ( pi = OutList.begin(); pi != OutList.end(); pi++ )
-    cerr << *pi << endl;
+  if ( false )
+    {
+      for ( pi = OutList.begin(); pi != OutList.end(); pi++ )
+       cerr << *pi << endl;
+    }
+  else
+    {
+      cerr << OutList.size() << ( ( OutList.size() == 1 ) ? " file" : " files" ) << endl;
+    }
 
   cerr << "----------------------------------" << endl;
   OutList.clear();
@@ -130,6 +141,7 @@ main(int argc, const char** argv)
   FreeSpaceForPath("/", free_space, total_space);
   cerr << "Free space: " << free_space << endl;
   cerr << "Total space: " << total_space << endl;
+  cerr << "Used space: " << ( (total_space - free_space ) / float(total_space) ) << endl;
 
   cerr << "OK" << endl;