-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #558 from smeup/bugfix/LS24003187/like-variable-fr…
…om-copy Bugfix/ls24003187/like variable from copy
- Loading branch information
Showing
6 changed files
with
169 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT18ProcedureTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
package com.smeup.rpgparser.smeup | ||
|
||
open class MULANGT18ProcedureTest : MULANGTTest() | ||
import org.junit.Test | ||
import kotlin.test.assertEquals | ||
|
||
open class MULANGT18ProcedureTest : MULANGTTest() { | ||
/** | ||
* LIKE to variable defined into a COPY. This one is also declared inner of procedure. | ||
* @see #LS24003187 | ||
*/ | ||
@Test | ||
fun executeMU181003() { | ||
val expected = listOf("O: HT -P:HT_P") | ||
assertEquals(expected, "smeup/MU181003".outputOf(configuration = smeupConfig)) | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
rpgJavaInterpreter-core/src/test/resources/QILEGEN/£RISBS.rpgle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
*==================================================================== | ||
* smeup V6R1.023DV | ||
* Nome sorgente : £RISBS | ||
* Sorgente di origine : SMEUP_DEV/QILEGEN(£RISBS) | ||
* Esportato il : 20240613 143719 | ||
*==================================================================== | ||
V* ============================================================== | ||
V* MODIFICHE Ril. T Au Descrizione | ||
V* gg/mm/aa nn.mm i xx Breve descrizione | ||
V* ============================================================== | ||
V* 13/03/01 04.00 GG Sostituito £RITST con £RISA5 | ||
V* 22/10/04 V2R1 PV Aggiunto livello di chiamata | ||
D*---------------------------------------------------------------- | ||
D* OBIETTIVO | ||
D* Eseguire la ricerca alfabetica e/o il controllo validità/deco- | ||
D* difica di subsettori tabelle SMEUP | ||
D* | ||
D* FLUSSO | ||
D* Input : £COSET : Codice settore | ||
D* £COSBS : Codice subsettore | ||
D* Output: £DESBS : Descrizione subsettore | ||
D* *IN35 : Se ON subsettore errato | ||
D* *IN36 : Se ON eseguita ricerca | ||
D* | ||
D* ESEMPIO DI CHIAMATA | ||
D*C MOVEL<settore> £COSET | ||
D*C MOVEL<subsett.>£COSBS | ||
D*C EXSR £RISBS | ||
D*C MOVEL£DESBS <campo descrizione> | ||
D*C 35 N60 MOVE 'BAS0001' £MSGCO | ||
D*C 35 SETON 60<ind.err.> | ||
2 D*C N35 36 SETON 10 | ||
D*C N35 36 MOVEL£COSBS <campo subsettore> | ||
D*---------------------------------------------------------------- | ||
C £RISBS BEGSR | ||
C 'A' IFEQ 'B' | ||
C MOVEL £COSET £COSET 3 | ||
C MOVE £COSBS £COSBS 2 | ||
C MOVE £RSSLC £RSSLC 1 | ||
C ENDIF | ||
C MOVEL £COSET £RISA5 5 | ||
C MOVE £COSBS £RISA5 | ||
C 'B£AR80' CAT(P) £RSSLC:0 £RSSPG 10 | ||
C CALL £RSSPG | ||
C PARM £RISA5 | ||
C PARM £DESBS 30 | ||
C PARM £IN35 1 | ||
C PARM £IN36 1 | ||
C £IN35 COMP '1' 35 | ||
C £IN36 COMP '1' 36 | ||
C MOVEL £RISA5 £COSET | ||
C MOVE £RISA5 £COSBS | ||
C ENDSR |
50 changes: 50 additions & 0 deletions
50
rpgJavaInterpreter-core/src/test/resources/smeup/MU181003.rpgle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
V* ============================================================== | ||
V* MODIFICHE Ril. T Au Descrizione | ||
V* gg/mm/aa nn.mm i xx Breve descrizione | ||
V* ============================================================== | ||
V* 03/07/24 MUTEST APU001 Creazione | ||
V*===================================================================== | ||
O * OBIETTIVO | ||
O * Testare il funzionamento della definizione di una variabile, | ||
O * all'interno di una procedura, mediante LIKE verso una presente | ||
O * in una COPY. | ||
O * Questa COPY sarà presente all'interno della procedura stessa. | ||
O * A tal proposito, quest'ultima non dovrà contenere specifiche D, | ||
O * ma dichiarazioni inline di specifiche C. | ||
V* ============================================================== | ||
D A10_S10 S 10 | ||
* -------------------------------------------------------------- | ||
/COPY QILEGEN,MULANG_D_D | ||
*--------------------------------------------------------------------- | ||
RD* M A I N | ||
*--------------------------------------------------------------------- | ||
C EVAL £DBG_Pgm = 'MU181003' | ||
C EVAL £DBG_Sez = 'A10' | ||
C EVAL £DBG_Fun = '*INZ' | ||
C EXSR £DBG | ||
C EXSR SEZ_A10 | ||
C EXSR £DBG | ||
C EVAL £DBG_Fun = '*END' | ||
C EXSR £DBG | ||
C SETON LR | ||
*--------------------------------------------------------------------- | ||
RD* Test atomico LIKE ad una variabile in COPY | ||
*--------------------------------------------------------------------- | ||
C SEZ_A10 BEGSR | ||
OA* A£.CDOP(LIKE) | ||
C EVAL £DBG_Pas='P03' | ||
C EVAL A10_S10 = ' HT ' | ||
C EVAL £DBG_Str = 'O:' + | ||
C A10_S10 + '-P:' + | ||
C %TRIMR(A10_PR03()) | ||
C ENDSR | ||
/COPY QILEGEN,MULANG_D_C | ||
*--------------------------------------------------------------------- | ||
P A10_PR03 B | ||
D A10_PR03 PI 10 | ||
D A10_PR03_V1 S LIKE(£RSSPG) | ||
C EVAL A10_PR03_V1 = A10_S10 | ||
C RETURN %TRIM(A10_PR03_V1) + '_P' | ||
/COPY QILEGEN,£RISBS | ||
P A10_PR03 E | ||
*--------------------------------------------------------------------- |