diff options
Diffstat (limited to 'tests/i/text-files')
| -rw-r--r-- | tests/i/text-files/notes.md | 2 | ||||
| -rw-r--r-- | tests/i/text-files/program.cps | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/i/text-files/notes.md b/tests/i/text-files/notes.md index cc62aea..1b2ecad 100644 --- a/tests/i/text-files/notes.md +++ b/tests/i/text-files/notes.md @@ -6,4 +6,4 @@ Basis: CIE p. 25; CRLF input handling follows project text-file semantics. Trace: Input contains three lines, including an empty line and a last line without terminator. Empty-file EOF is true. WRITE replaces old contents; APPEND adds last after the existing blank line. -The project requires DO after WHILE; this fixture uses that spelling to exercise runtime semantics. The separate standard-while fixture tests the CIE spelling. +WHILE headers use the standard CIE spelling without DO. The separate standard-while fixture also checks this syntax. diff --git a/tests/i/text-files/program.cps b/tests/i/text-files/program.cps index 1d6d5bb..42632fd 100644 --- a/tests/i/text-files/program.cps +++ b/tests/i/text-files/program.cps @@ -2,7 +2,7 @@ DECLARE Line : STRING DECLARE Count : INTEGER OPENFILE "input.txt" FOR READ Count <- 0 -WHILE NOT EOF("input.txt") DO +WHILE NOT EOF("input.txt") READFILE "input.txt", Line OUTPUT "[", Line, "]" Count <- Count + 1 @@ -19,7 +19,7 @@ OPENFILE "result.txt" FOR APPEND WRITEFILE "result.txt", "last" CLOSEFILE "result.txt" OPENFILE "result.txt" FOR READ -WHILE NOT EOF("result.txt") DO +WHILE NOT EOF("result.txt") READFILE "result.txt", Line OUTPUT "[", Line, "]" ENDWHILE |
