Skip to content

Commit

Permalink
Merge pull request #564 from smeup/bugfix/LS24003296/like-case-insens…
Browse files Browse the repository at this point in the history
…itive

Bugfix/ls24003296/like case insensitive
  • Loading branch information
lanarimarco committed Jul 11, 2024
2 parents 61323ee + 2310bd2 commit 7156791
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ open class BaseCompileTimeInterpreter(
it.dcl_ds() != null -> {
val name = it.dcl_ds().name
val fields = fileDefinitions?.let { defs -> it.dcl_ds().getExtnameFields(defs, conf) } ?: emptyList()
if (name == declName) {
if (name.equals(declName, ignoreCase = true)) {
return it.dcl_ds().elementSizeOf(knownDataDefinitions, fields)
}
}
Expand Down Expand Up @@ -313,7 +313,7 @@ open class BaseCompileTimeInterpreter(
}
is StatementThatCanDefineData -> {
val dataDefinition = ast.dataDefinition()
dataDefinition.firstOrNull { it.name == declName }?.type
dataDefinition.firstOrNull { it.name.equals(declName, ignoreCase = true) }?.type
}
else -> null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,14 @@ open class MULANGT02ConstAndDSpecTest : MULANGTTest() {
val expected = listOf("9991\uFFFF\uFFFF99999")
assertEquals(expected, "smeup/MUDRNRAPU00227".outputOf(configuration = smeupConfig))
}

/**
* LIKE on a PList with case in-sensitive lookup
* @see #LS24003296
*/
@Test
fun executeMUDRNRAPU00230() {
val expected = listOf("ok")
assertEquals(expected, "smeup/MUDRNRAPU00230".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
D £DBG_Str S 2

D $OavFU S Like(£OavFU)
D $OavME S Like(£OavME)
D §OavFU S Like(£OavFU)
D §OavME S Like(£OavME)

C *ENTRY PLIST
C PARM £OAVFU 10 Funzione
C PARM £OAVME 10 Metodo

C EVAL £DBG_Str='ok'
C £DBG_Str DSPLY

0 comments on commit 7156791

Please sign in to comment.