mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
u8 all the things
This commit is contained in:
parent
98082fcec5
commit
8505768736
2 changed files with 6 additions and 4 deletions
|
@ -9,7 +9,8 @@ openmw_add_executable(openmw-iniimporter-tests ${INIIMPORTER_TESTS_SRC_FILES})
|
|||
target_include_directories(openmw-iniimporter-tests SYSTEM PRIVATE ${GTEST_INCLUDE_DIRS})
|
||||
target_include_directories(openmw-iniimporter-tests SYSTEM PRIVATE ${GMOCK_INCLUDE_DIRS})
|
||||
|
||||
add_definitions(-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}")
|
||||
#add_definitions(-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}")
|
||||
target_compile_definitions(openmw-iniimporter-tests PRIVATE CMAKE_BINARY_DIR=u8"${CMAKE_BINARY_DIR}")
|
||||
|
||||
target_link_libraries(openmw-iniimporter-tests PRIVATE
|
||||
GTest::GTest
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <components/misc/strings/conversion.hpp>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <gtest/gtest.h>
|
||||
|
@ -35,10 +36,10 @@ Archive 1=game2.bsa
|
|||
tempFile.close();
|
||||
std::filesystem::path tempCfgFile = std::filesystem::temp_directory_path() / (param.fileName + ".cfg");
|
||||
|
||||
std::stringstream cmd;
|
||||
cmd << CMAKE_BINARY_DIR << "/openmw-iniimporter -i " << tempIniFile << " -c " << tempCfgFile;
|
||||
std::basic_stringstream<char8_t> cmd;
|
||||
cmd << CMAKE_BINARY_DIR << u8"/openmw-iniimporter -i " << tempIniFile << u8" -c " << tempCfgFile;
|
||||
|
||||
int ret = std::system(cmd.str().c_str());
|
||||
int ret = std::system(Misc::StringUtils::u8StringToString(std::u8string(cmd.str())).c_str());
|
||||
ASSERT_EQ(ret, 0);
|
||||
|
||||
// Verify the cfg file was created and has the expected contents
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue