aboutsummaryrefslogtreecommitdiff
path: root/tests/hello_world_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hello_world_file.cpp')
-rw-r--r--tests/hello_world_file.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/hello_world_file.cpp b/tests/hello_world_file.cpp
new file mode 100644
index 00000000..71fb953b
--- /dev/null
+++ b/tests/hello_world_file.cpp
@@ -0,0 +1,13 @@
+#include <stdio.h>
+int main() {
+ FILE *file = fopen("tests/hello_world_file.txt", "rb");
+ while (!feof(file)) {
+ char c = fgetc(file);
+ if (c != EOF) {
+ putchar(c);
+ }
+ }
+ fclose (file);
+ return 0;
+}
+