mirror of
https://github.com/drasko/codezero.git
synced 2026-02-11 17:33:15 +01:00
test0 tests now don't fork, they compare read/write strings.
This commit is contained in:
@@ -56,6 +56,8 @@ int fileio2(void)
|
||||
printf("%d: Read: %d bytes from file.\n", tid, cnt);
|
||||
if (cnt) {
|
||||
printf("%d: Read string: %s\n", tid, buf);
|
||||
if (strcmp(buf, str))
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("%d: close.\n", tid);
|
||||
@@ -104,6 +106,8 @@ int fileio(void)
|
||||
printf("%d: Read: %d bytes from file.\n", tid, cnt);
|
||||
if (cnt) {
|
||||
printf("%d: Read string: %s\n", tid, buf);
|
||||
if (strcmp(buf, str))
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("%d: close.\n", tid);
|
||||
|
||||
Reference in New Issue
Block a user