未验证 提交 e8d15777 编写于 作者: O openharmony_ci 提交者: Gitee

!7795 fix xts for zlib gzungetc

Merge pull request !7795 from longwei/master
......@@ -1267,13 +1267,12 @@ HWTEST_F(ActsZlibTest, ActsZlibTestGzUnGetc, Function | MediumTest | Level2)
#else
std::lock_guard<std::mutex> lock(file_mutex);
gzFile file;
file = gzopen(TESTFILE, "wb");
ASSERT_TRUE(file != NULL);
gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
gzclose(file);
file = gzopen(TESTFILE, "rb");
ASSERT_TRUE(file != NULL);
ASSERT_FALSE(gzungetc(' ', file) != ' ');
ASSERT_FALSE(gzungetc('a', file) != 'a');
char sz_read[5] = {0};
gzread(file, sz_read, 1);
ASSERT_TRUE(sz_read[0] == 'a');
gzclose(file);
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册