diff --git a/unittest/dawg_test.cc b/unittest/dawg_test.cc index 5af90b546..7e4b8b43e 100644 --- a/unittest/dawg_test.cc +++ b/unittest/dawg_test.cc @@ -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);