Skip to content

Commit

Permalink
Add a SEARCH ALL test with non-0xff HIGH-VALUE
Browse files Browse the repository at this point in the history
  • Loading branch information
nberth committed Aug 23, 2024
1 parent c48603e commit ff7761b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/testsuite.src/run_misc.at
Original file line number Diff line number Diff line change
Expand Up @@ -3969,6 +3969,38 @@ AT_CHECK([$COBCRUN_DIRECT ./ebcdic], [0], [], [])
AT_CLEANUP


AT_SETUP([SEARCH ALL with non-0xff HIGH-VALUE])
AT_KEYWORDS([runmisc default-colseq])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
PROGRAM-ID. prog.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TAB.
02 TAB-ELT OCCURS 3
ASCENDING KEY TAB-KEY
INDEXED BY TI.
05 TAB-KEY PIC X.
PROCEDURE DIVISION.
MOVE HIGH-VALUE TO TAB
MOVE "1" TO TAB-ELT (1)
* DISPLAY "|" TAB "|"
SEARCH ALL TAB-ELT
AT END
DISPLAY '"1" NOT FOUND'
WHEN TAB-KEY (TI) = "1"
CONTINUE
END-SEARCH
STOP RUN.
])

AT_CHECK([$COMPILE -febcdic-table=ebcdic500_latin1 -fdefault-colseq=EBCDIC prog.cob], [0], [], [])
AT_CHECK([$COBCRUN_DIRECT ./prog], [0], [], [])

AT_CLEANUP


AT_SETUP([PIC ZZZ-, ZZZ+])
AT_KEYWORDS([runmisc editing])

Expand Down

0 comments on commit ff7761b

Please sign in to comment.