Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/gnucobol-3.x' into gcos4gnucob…
Browse files Browse the repository at this point in the history
…ol-3.x
  • Loading branch information
ddeclerck committed Mar 13, 2024
2 parents 5713357 + 61479ba commit a2a51fd
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@


2024-02-19 Boris Eng <[email protected]>

* parser.y (screen_value_clause): replaced basic literals by literals

2024-01-25 David Declerck <[email protected]>

FR #459: support COLLATING SEQUENCE clause on SELECT / INDEXED files
Expand Down
2 changes: 1 addition & 1 deletion cobc/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -10133,7 +10133,7 @@ screen_option:
;

screen_value_clause:
_value_is basic_literal
_value_is literal
{
/* omitting VALUE is at least allowed in MS-COBOL, MF-COBOL, ACUCOBOL for SCREEN VALUE,
and not according to XOPEN uses 85-std which has no SCREEN SECTION and newer Standards */
Expand Down
30 changes: 30 additions & 0 deletions tests/testsuite.src/run_manual_screen.at
Original file line number Diff line number Diff line change
Expand Up @@ -3510,3 +3510,33 @@ MANUAL_CHECK([$COBCRUN_DIRECT ./prog], [0], [], [])

AT_CLEANUP


AT_SETUP([VALUE ALL in SCREEN SECTION])

AT_SKIP_IF([test "$COB_HAS_CURSES" != "yes"])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
PROGRAM-ID. SCREEN-VALUE-ALL.

DATA DIVISION.
WORKING-STORAGE SECTION.

SCREEN SECTION.
01 SCREEN001 BLANK SCREEN AUTO-SKIP.
03 SCR01 BACKGROUND-COLOR 2 FOREGROUND-COLOR 7.
05 LINE 02 COL 001 PIC X(50) VALUE ALL '-'.

PROCEDURE DIVISION.
DISPLAY 'Press ENTER if you see a sequence of ""-""'
AT 0101 END-DISPLAY
DISPLAY ' ' AT 0201 END-DISPLAY
ACCEPT SCREEN001
ACCEPT OMITTED
GOBACK.
])

AT_CHECK([$COMPILE prog.cob], [0], [], [])
MANUAL_CHECK([$COBCRUN_DIRECT ./prog], [0], [], [])

AT_CLEANUP
23 changes: 23 additions & 0 deletions tests/testsuite.src/syn_screen.at
Original file line number Diff line number Diff line change
Expand Up @@ -882,3 +882,26 @@ AT_CHECK([$COMPILE_ONLY prog.cob], [0], [],
])

AT_CLEANUP


AT_SETUP([VALUE ALL in SCREEN SECTION])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
PROGRAM-ID. SCREEN-VALUE-ALL.

DATA DIVISION.
WORKING-STORAGE SECTION.

SCREEN SECTION.
01 SCREEN001 BLANK SCREEN AUTO-SKIP.
03 SCR01 BACKGROUND-COLOR 2 FOREGROUND-COLOR 7.
05 LINE 02 COL 001 PIC X(50) VALUE ALL '-'.

PROCEDURE DIVISION.
GOBACK.
])

AT_CHECK([$COMPILE_ONLY prog.cob], [0], [], [])

AT_CLEANUP

0 comments on commit a2a51fd

Please sign in to comment.