[test] Fix mkdir on unix in dawg test.

This commit is contained in:
Egor Pugin 2020-12-30 03:33:28 +03:00
parent 38ffaf60f3
commit dc9bfde8ec

View File

@ -73,7 +73,11 @@ class DawgTest : public testing::Test {
std::string orig_wordlist = file::JoinPath(TESTING_DIR, wordlist_filename);
std::string output_dawg = OutputNameToPath(wordlist_filename + ".dawg");
std::string output_wordlist = OutputNameToPath(wordlist_filename);
mkdir(FLAGS_test_tmpdir);
#if defined(_WIN32)
_mkdir(FLAGS_test_tmpdir);
#else
mkdir(FLAGS_test_tmpdir, S_IRWXU | S_IRWXG);
#endif
LoadWordlist(orig_wordlist, &orig_words);
EXPECT_EQ(
RunCommand(wordlist2dawg_prog, orig_wordlist, output_dawg, unicharset), 0);