skip test for file not readable due to permissions on windows
This commit is contained in:
@ -65,9 +65,14 @@ TEST_F(TextFileReaderTest, nofile)
|
|||||||
FileReaderException);
|
FileReaderException);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this test cannot work on windows due to its non unix-like permission system
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
TEST_F(TextFileReaderTest, permissions)
|
TEST_F(TextFileReaderTest, permissions)
|
||||||
{
|
{
|
||||||
|
platform::unlink("text_reader_noperms.file");
|
||||||
FILE *fp = fopen("text_reader_noperms.file", "w");
|
FILE *fp = fopen("text_reader_noperms.file", "w");
|
||||||
|
ASSERT_NE(fp,nullptr);
|
||||||
fputs("word\n", fp);
|
fputs("word\n", fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
chmod("text_reader_noperms.file", 0);
|
chmod("text_reader_noperms.file", 0);
|
||||||
@ -75,6 +80,7 @@ TEST_F(TextFileReaderTest, permissions)
|
|||||||
FileReaderException);
|
FileReaderException);
|
||||||
platform::unlink("text_reader_noperms.file");
|
platform::unlink("text_reader_noperms.file");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_F(TextFileReaderTest, nofp)
|
TEST_F(TextFileReaderTest, nofp)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user