From 5126ec78167bbb74125443b02611902ee97a282a Mon Sep 17 00:00:00 2001 From: Rob Hagemans Date: Sun, 10 Jul 2022 07:08:28 +0100 Subject: [PATCH] add tests for issue #196: typing in program line with line feed remove editor swap file from type_program_with_line_feed --- .../type_program_with_line_feed/PCBASIC.INI | 6 ++++ .../type_program_with_line_feed/TEST.BAS | 12 ++++++++ .../model/OUTPUT.TXT | 26 ++++++++++++++++++ .../.PCBASIC.INI.swp | Bin 0 -> 1024 bytes .../PCBASIC.INI | 6 ++++ .../type_program_with_line_feed_ESC/TEST.BAS | 12 ++++++++ .../model/OUTPUT.TXT | 26 ++++++++++++++++++ 7 files changed, 88 insertions(+) create mode 100644 tests/basic/gwbasic/type_program_with_line_feed/PCBASIC.INI create mode 100644 tests/basic/gwbasic/type_program_with_line_feed/TEST.BAS create mode 100644 tests/basic/gwbasic/type_program_with_line_feed/model/OUTPUT.TXT create mode 100644 tests/basic/gwbasic/type_program_with_line_feed_ESC/.PCBASIC.INI.swp create mode 100644 tests/basic/gwbasic/type_program_with_line_feed_ESC/PCBASIC.INI create mode 100644 tests/basic/gwbasic/type_program_with_line_feed_ESC/TEST.BAS create mode 100644 tests/basic/gwbasic/type_program_with_line_feed_ESC/model/OUTPUT.TXT diff --git a/tests/basic/gwbasic/type_program_with_line_feed/PCBASIC.INI b/tests/basic/gwbasic/type_program_with_line_feed/PCBASIC.INI new file mode 100644 index 000000000..cf1b09a52 --- /dev/null +++ b/tests/basic/gwbasic/type_program_with_line_feed/PCBASIC.INI @@ -0,0 +1,6 @@ +[pcbasic] +font=freedos +quit=False +load=TEST.BAS +soft-linefeed=False +keys=2010 rem continuing\nline\rlist\rrun 1000\rsystem\r diff --git a/tests/basic/gwbasic/type_program_with_line_feed/TEST.BAS b/tests/basic/gwbasic/type_program_with_line_feed/TEST.BAS new file mode 100644 index 000000000..90d4aadfd --- /dev/null +++ b/tests/basic/gwbasic/type_program_with_line_feed/TEST.BAS @@ -0,0 +1,12 @@ +999 END +1000 ' dump screen with RUN 1000 +1010 DEF SEG=&HB800 +1020 OPEN "output.txt" FOR OUTPUT AS 1 +1030 FOR Y = 0 TO 24 +1040 FOR X = 0 TO 79 +1050 PRINT #1, CHR$(PEEK(2*(Y*80+X))); +1060 NEXT +1065 PRINT #1, "" +1070 NEXT +1080 CLOSE 1 + diff --git a/tests/basic/gwbasic/type_program_with_line_feed/model/OUTPUT.TXT b/tests/basic/gwbasic/type_program_with_line_feed/model/OUTPUT.TXT new file mode 100644 index 000000000..a94a4b262 --- /dev/null +++ b/tests/basic/gwbasic/type_program_with_line_feed/model/OUTPUT.TXT @@ -0,0 +1,26 @@ +Ok˙ +2010 rem continuing +line +list +999 END +1000 ' dump screen with RUN 1000 +1010 DEF SEG=&HB800 +1020 OPEN "output.txt" FOR OUTPUT AS 1 +1030 FOR Y = 0 TO 24 +1040 FOR X = 0 TO 79 +1050 PRINT #1, CHR$(PEEK(2*(Y*80+X))); +1060 NEXT +1065 PRINT #1, "" +1070 NEXT +1080 CLOSE 1 +2010 REM continuing +line +Ok˙ +run 1000 + + + + + + + \ No newline at end of file diff --git a/tests/basic/gwbasic/type_program_with_line_feed_ESC/.PCBASIC.INI.swp b/tests/basic/gwbasic/type_program_with_line_feed_ESC/.PCBASIC.INI.swp new file mode 100644 index 0000000000000000000000000000000000000000..60e20484df3cf0865f45597cb69cdef62bafd412 GIT binary patch literal 1024 zcmYc?$V<%2S1{7E)H7y40v6s33`O}#NFunINr`zWnaTP2CAgJlQ$``UT0lU;+J-)MA*VetJ1ntg;|A9;h