14 #include <boost/filesystem/path.hpp>
15 #include <boost/version.hpp>
16 #include <cppunit/extensions/HelperMacros.h>
17 #include <tst/Verify.h>
18 #include <utl/FileName.h>
20 namespace fs = boost::filesystem;
32 CPPUNIT_TEST(testBareFilePath);
33 CPPUNIT_TEST(testBareFileName);
34 CPPUNIT_TEST(testFileExtension);
35 CPPUNIT_TEST(testAppend);
36 CPPUNIT_TEST_SUITE_END();
42 #if BOOST_FILESYSTEM_VERSION < 3
43 if (fs::path::default_name_check_writable())
44 fs::path::default_name_check(fs::portable_posix_name);
53 string n1(
"/a/b.q/c.ext");
55 string n2(
"/b.q/c.ext");
63 string n6(
"/b.q/.ext");
65 string n7(
"a.q/c.ext");
74 string n1(
"/a/b.q/c.ext");
76 string n2(
"/b.q/c.ext");
84 string n6(
"/b.q/.ext");
86 string n7(
"a.q/c.ext");
95 string n1(
"/a/b.q/c.ext");
97 string n2(
"/b.q/c.ext");
105 string n6(
"/b.q/.ext");
107 string n7(
"a.q/c.ext");
116 fs::path p1(
"/a/b.q/c");
118 std::cout <<
"============= " << (p1+
".ext").
string() << std::endl;
120 CPPUNIT_ASSERT((p1+
".ext").
string() ==
"/a/b.q/c.ext");
125 CPPUNIT_ASSERT((p3+
".ext").
string() ==
".ext");
std::string BareFileName(const fs::path &thePath)
fs::path BareFilePath(const fs::path &thePath)
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
std::string FileExtension(const fs::path &thePath)