tests: More work on error handling
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
#include "test_helpers.h"
|
||||
|
||||
int main(void) {
|
||||
freopen("stdio/stdio.in", "r", stdin);
|
||||
char in[6];
|
||||
fgets(in, 6, stdin);
|
||||
printf("%s\n", in); // should print Hello
|
||||
FILE *f = freopen("stdio/stdio.in", "r", stdin);
|
||||
ERROR_IF(freopen, f, == NULL);
|
||||
|
||||
char in[6];
|
||||
fgets(in, 6, stdin);
|
||||
printf("%s\n", in); // should print Hello
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user