From 5c00b8cd03cbfc516cce92229f3f4974d7549c24 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 20:53:52 +0800 Subject: test(compiler): cover fixed CIE behavior and runtime boundaries Record independently traced outputs with pending human review. Keep standard syntax and naming conflicts as real failures. Co-Authored-By: Claude Fable 5.1 --- tests/i/text-files/program.cps | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/i/text-files/program.cps (limited to 'tests/i/text-files/program.cps') diff --git a/tests/i/text-files/program.cps b/tests/i/text-files/program.cps new file mode 100644 index 0000000..1d6d5bb --- /dev/null +++ b/tests/i/text-files/program.cps @@ -0,0 +1,26 @@ +DECLARE Line : STRING +DECLARE Count : INTEGER +OPENFILE "input.txt" FOR READ +Count <- 0 +WHILE NOT EOF("input.txt") DO + READFILE "input.txt", Line + OUTPUT "[", Line, "]" + Count <- Count + 1 +ENDWHILE +CLOSEFILE "input.txt" +OPENFILE "empty.txt" FOR READ +OUTPUT EOF("empty.txt"), ":", Count +CLOSEFILE "empty.txt" +OPENFILE "result.txt" FOR WRITE +WRITEFILE "result.txt", "first" +WRITEFILE "result.txt", "" +CLOSEFILE "result.txt" +OPENFILE "result.txt" FOR APPEND +WRITEFILE "result.txt", "last" +CLOSEFILE "result.txt" +OPENFILE "result.txt" FOR READ +WHILE NOT EOF("result.txt") DO + READFILE "result.txt", Line + OUTPUT "[", Line, "]" +ENDWHILE +CLOSEFILE "result.txt" -- cgit v1.3.1-4-g156e