Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-apuliasoft committed Nov 25, 2024
1 parent 334aad3 commit 6e1914a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,12 @@ Test 6
assertEquals(expected, outputOf("GOTOTST9"))
}

@Test
fun executeGOTOTST10() {
val expected = listOf("ok", "ok")
assertEquals(expected, outputOf("GOTOTST10"))
}

@Test
fun executeGotoENDSR() {
assertEquals(listOf("1", "2", "3"), outputOf("GOTOENDSR"))
Expand Down
13 changes: 13 additions & 0 deletions rpgJavaInterpreter-core/src/test/resources/GOTOTST10.rpgle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
V* ==============================================================
V* 25/11/2024 APU002 Creation
V* ==============================================================
O * PROGRAM GOAL
O * Execute a subroutine with a CALL to a program performing a top-level GOTO
V* ==============================================================
C EXSR SR1
C SETON LR

C SR1 BEGSR
C CALL 'GOTOTST10B'
C 'ok' DSPLY
C ENDSR
10 changes: 10 additions & 0 deletions rpgJavaInterpreter-core/src/test/resources/GOTOTST10B.rpgle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
V* ==============================================================
V* 25/11/2024 APU002 Creation
V* ==============================================================
O * PROGRAM GOAL
O * Being called by 'GOTOTST10.rpgle'
V* ==============================================================
C GOTO TAG1
C 'ko' DSPLY
C TAG1 TAG
C 'ok' DSPLY

0 comments on commit 6e1914a

Please sign in to comment.