From dc9bfde8ec694584e03cdf5a4088a7e158d538cd Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 30 Dec 2020 03:33:28 +0300 Subject: [PATCH] [test] Fix mkdir on unix in dawg test. --- unittest/dawg_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);