]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/path_test.cxx
Fix a bug affecting TerraGear, and extend unit-tests to cover this. (SGPath::file...
[simgear.git] / simgear / misc / path_test.cxx
index cda488590c42d2921aba99e0fb13273c75e3ce6b..459f064cdd78a3464851863b5badecfda75db4c6 100644 (file)
@@ -135,6 +135,14 @@ int main(int argc, char* argv[])
 #else
     COMPARE(d1.str_native(), std::string("/usr/local"));
 #endif
+  
+// paths with only the file components
+    SGPath pf("something.txt.gz");
+    COMPARE(pf.base(), "something.txt");
+    COMPARE(pf.file(), "something.txt.gz");
+    COMPARE(pf.dir(), "");
+    COMPARE(pf.lower_extension(), "gz");
+    COMPARE(pf.complete_lower_extension(), "txt.gz");
     
     test_dir();