fixed Assign(fullpath, fullname)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-12-04 01:14:09 +00:00
parent a8e6bf8ae2
commit 81f256328c
4 changed files with 64 additions and 15 deletions

View File

@@ -740,6 +740,17 @@ static void TestFileConfRead()
#include "wx/filename.h"
static void DumpFileName(const wxFileName& fn)
{
wxString full = fn.GetFullPath();
wxString vol, path, name, ext;
wxFileName::SplitPath(full, &vol, &path, &name, &ext);
wxPrintf(_T("Filename '%s' -> vol '%s', path '%s', name '%s', ext '%s'\n"),
full.c_str(), vol.c_str(), path.c_str(), name.c_str(), ext.c_str());
}
static struct FileNameInfo
{
const wxChar *fullname;
@@ -5216,11 +5227,19 @@ int main(int argc, char **argv)
#endif // TEST_FILE
#ifdef TEST_FILENAME
TestFileNameTemp();
if ( 0 )
{
wxFileName fn;
fn.Assign("c:\\foo", "bar.baz");
DumpFileName(fn);
}
if ( 0 )
{
TestFileNameConstruction();
TestFileNameSplit();
TestFileNameTemp();
TestFileNameCwd();
TestFileNameComparison();
TestFileNameOperations();