Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cosentino-smeup committed Jan 29, 2024
1 parent f494522 commit ca5e1cd
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,16 @@ open class SmeupInterpreterTest : AbstractTest() {
val expected = listOf("A50_AR1(10) A50_AR2(40)")
assertEquals(expected, "smeup/T02_A50_P03".outputOf())
}

@Test
fun executeT40_A10_P01() {
val expected = listOf("")
assertEquals(expected, "smeup/T40_A10_P01".outputOf(configuration = smeupConfig))
}

@Test
fun executeTestTony() {
val expected = listOf("")
assertEquals(expected, "smeup/test_tony".outputOf(configuration = smeupConfig))
}
}
34 changes: 34 additions & 0 deletions rpgJavaInterpreter-core/src/test/resources/smeup/T40_A10_P01.rpgle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
D A10_DS_P01 E DS EXTNAME(MULANGTF) INZ
*
D A10_DS_P04 E DS EXTNAME(MULANGTF) INZ
D PREFIX(P4:2)
*
D £DBG_Str S 2580
*
C EVAL £DBG_Str='Lunghezza: '
C +%CHAR(%LEN(A10_DS_P01))
C +' Contenuto: '
C +MLSYST
C +'-'+MLLIBR
C +'-'+MLFILE
C +'-'+MLTIPO
C +'-'+MLPROG
C +'-'+MLPSEZ
C +'-'+MLPPAS
C +'-'+MLPDES
C +'-'+MLSQIN
C +'-'+MLSQFI
C +'-'+MLAAAT
C +'-'+MLAAVA
C +'-'+%CHAR(MLNNAT)
C +'-'+%CHAR(MLNNVA)
C +'-'+MLINDI
C +'-'+%CHAR(MLTEES)
C +'-'+MLUSES
C +'-'+%CHAR(MLDTES)
C +'-'+%CHAR(MLORES)
C +'-'+MLASLA
C +'-'+%CHAR(MLASNR)
*
C £DBG_Str DSPLY
C SETON LR
21 changes: 21 additions & 0 deletions rpgJavaInterpreter-core/src/test/resources/smeup/test_tony.rpgle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FMULANGTF IF E DISK
D A10_DS_P04 E DS EXTNAME(MULANGTF) INZ PREFIX(P4:2)
*
D MYDS DS
D MLPROG
D MLPSEZ
*
D £DBG_Str S 50
*
C READ MULANGTF 50
*
C *IN50 IFEQ *OFF
C EVAL £DBG_Str=
C ' MYDS('+MYDS+')'
C +' MLPROG('+MLPROG+')'
C +' MLPSEZ('+MLPSEZ+')'
C +' P4PROG('+P4PROG+')'
C £DBG_Str DSPLY
C ENDIF
*
C SETON LR

0 comments on commit ca5e1cd

Please sign in to comment.