2014-11-28 15:54:18 +01:00
|
|
|
#include "testutils/FuseMkdirTest.h"
|
|
|
|
|
|
|
|
using ::testing::_;
|
|
|
|
using ::testing::StrEq;
|
|
|
|
using ::testing::WithParamInterface;
|
|
|
|
using ::testing::Values;
|
|
|
|
|
|
|
|
class FuseMkdirModeTest: public FuseMkdirTest, public WithParamInterface<mode_t> {
|
|
|
|
};
|
|
|
|
INSTANTIATE_TEST_CASE_P(FuseMkdirModeTest, FuseMkdirModeTest, Values(0, S_IRUSR, S_IRGRP, S_IXOTH, S_IRUSR|S_IRGRP|S_IROTH|S_IRGRP));
|
|
|
|
|
|
|
|
|
|
|
|
TEST_P(FuseMkdirModeTest, Mkdir) {
|
|
|
|
ReturnDoesntExistOnLstat(DIRNAME);
|
2015-04-25 03:26:59 +02:00
|
|
|
EXPECT_CALL(fsimpl, mkdir(StrEq(DIRNAME), GetParam(), _, _))
|
2014-11-28 15:54:18 +01:00
|
|
|
.Times(1).WillOnce(FromNowOnReturnIsDirOnLstat());
|
|
|
|
|
|
|
|
Mkdir(DIRNAME, GetParam());
|
|
|
|
}
|