added a new example program that it's fix filename test.

This commit is contained in:
hyzboy 2021-09-04 13:53:17 +08:00
parent 85752d4ec3
commit 7349b345d5
2 changed files with 19 additions and 0 deletions

View File

@ -19,3 +19,6 @@ cm_example_project(GetCpuInfo)
add_executable(CollectionTest CollectionTest.cpp)
cm_example_project(CollectionTest)
add_executable(FixFilenameTest FixFilenameTest.cpp)
cm_example_project(FixFilenameTest)

16
FixFilenameTest.cpp Normal file
View File

@ -0,0 +1,16 @@
#include<hgl/filesystem/Filename.h>
#include<iostream>
using namespace std;
using namespace hgl;
using namespace hgl::filesystem;
void main()
{
constexpr os_char incorrect_filename[]=OS_TEXT("c:/win95\\\\ms-dos");
os_out<<OS_TEXT("fix filename test that they have a few problems.\n\n");
os_out<<OS_TEXT("origin filename: ")<<incorrect_filename<<endl;
os_out<<OS_TEXT(" fixed filename: ")<<FixFilename(incorrect_filename).c_str()<<endl;
}