提交 4ad06c90 编写于 作者: N nanjinbin

resolve failed use cases.

Change-Id: I9ab95977e5ff37dfa084ff151e666d62cc82d0b9
上级 4f70d1b7
...@@ -154,7 +154,11 @@ HWTEST_F(IoTest, testSscanfChar, Function | MediumTest | Level1) ...@@ -154,7 +154,11 @@ HWTEST_F(IoTest, testSscanfChar, Function | MediumTest | Level1)
char c2[10] = {0}; char c2[10] = {0};
ret = sscanf("helloworld", "%5c", c2); ret = sscanf("helloworld", "%5c", c2);
EXPECT_EQ(ret, 1) << "> sscanf fail, errno = " << errno; EXPECT_EQ(ret, 1) << "> sscanf fail, errno = " << errno;
EXPECT_EQ(c2, "hello"); EXPECT_EQ(c2[0], 'h');
EXPECT_EQ(c2[1], 'e');
EXPECT_EQ(c2[2], 'l');
EXPECT_EQ(c2[3], 'l');
EXPECT_EQ(c2[4], 'o');
ret = sscanf("(a) and |b|", "(%c) and |%c%*c|", &c, &c1); ret = sscanf("(a) and |b|", "(%c) and |%c%*c|", &c, &c1);
EXPECT_EQ(ret, 2) << "> sscanf fail, errno = " << errno; EXPECT_EQ(ret, 2) << "> sscanf fail, errno = " << errno;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册