mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2025-02-28 23:41:33 +01:00
Updates to tests programs
This commit is contained in:
parent
429feed81b
commit
9b0cabaed9
@ -28,14 +28,21 @@ int main() {
|
|||||||
std::string executable_folder = whereami::executable_dir();
|
std::string executable_folder = whereami::executable_dir();
|
||||||
nowide::cout << "whereami::executable_dir() = " << executable_folder << std::endl;
|
nowide::cout << "whereami::executable_dir() = " << executable_folder << std::endl;
|
||||||
|
|
||||||
|
auto direct_u8path = std::filesystem::u8path(whereami::executable_dir());
|
||||||
|
nowide::cout << "u8path{whereami::executable_dir()} = " << direct_u8path << std::endl;
|
||||||
|
|
||||||
auto u8string = std::u8string(executable_folder.begin(), executable_folder.end());
|
auto u8string = std::u8string(executable_folder.begin(), executable_folder.end());
|
||||||
nowide::cout << "std::u8string{_)} = " << reinterpret_cast<const char*>(u8string.c_str()) << std::endl;
|
nowide::cout << "std::u8string{_} = " << reinterpret_cast<const char*>(u8string.c_str()) << std::endl;
|
||||||
|
|
||||||
std::filesystem::path u8path{u8string};
|
std::filesystem::path u8path{u8string};
|
||||||
nowide::cout << "std::filesystem::path{_} = " << u8path << std::endl;
|
nowide::cout << "std::filesystem::path{_} = " << u8path << std::endl;
|
||||||
|
|
||||||
nowide::cout << "nowide::ifstream{_} : " << std::endl;
|
nowide::cout << "nowide::ifstream{_.string()} : " << std::endl;
|
||||||
nowide::ifstream file_from_path(u8path / "test_file.txt");
|
nowide::ifstream file_from_path((u8path / "test_file.txt").string());
|
||||||
check_file(file_from_path);
|
check_file(file_from_path);
|
||||||
|
|
||||||
|
nowide::cout << "nowide::ifstream{direct_u8path.string()} : " << std::endl;
|
||||||
|
nowide::ifstream file_from_path2((direct_u8path / "test_file.txt").string());
|
||||||
|
check_file(file_from_path2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user