diff options
-rw-r--r-- | tests/hello_world_file.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/hello_world_file.cpp b/tests/hello_world_file.cpp index 71fb953b..97ea395e 100644 --- a/tests/hello_world_file.cpp +++ b/tests/hello_world_file.cpp @@ -1,6 +1,10 @@ #include <stdio.h> int main() { FILE *file = fopen("tests/hello_world_file.txt", "rb"); + if (!file) { + printf("cannot open file\n"); + return 1; + } while (!feof(file)) { char c = fgetc(file); if (c != EOF) { |