kernel32/tests: Ensure that pipe tests read the full pipe content.

This commit is contained in:
Sebastian Lackner 2014-09-04 17:10:45 +02:00 committed by Alexandre Julliard
parent 03f3ed89f3
commit 36debbe80f
1 changed files with 5 additions and 1 deletions

View File

@ -251,7 +251,9 @@ static void test_CreateNamedPipe(int pipemode)
} }
pbuf = ibuf; pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n"); ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
if (readden <= sizeof(obuf))
ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
/* Multiple writes in the reverse direction */ /* Multiple writes in the reverse direction */
/* the write of obuf2 from write4 should still be in the buffer */ /* the write of obuf2 from write4 should still be in the buffer */
ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n"); ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n");
@ -281,6 +283,8 @@ static void test_CreateNamedPipe(int pipemode)
} }
pbuf = ibuf; pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n"); ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
if (readden <= sizeof(obuf))
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
} }
/* Picky conformance tests */ /* Picky conformance tests */