Skip to content

Commit

Permalink
test/hexdump: hide output (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Sep 28, 2023
1 parent e59bbb4 commit 4c4c74f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/fmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,17 @@ int test_fmt_hexdump(void)
"8abcjt5m950gxvkuvippcvt60me9z5zh"
;

hexdump(stdout, buf, str_len(buf));
#ifdef WIN32
FILE *f = fopen("nul", "w");
#else
FILE *f = fopen("/dev/null", "w");
#endif
if (!f)
return EINVAL;

hexdump(f, buf, str_len(buf));

fclose(f);

return 0;
}

0 comments on commit 4c4c74f

Please sign in to comment.