Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/LS24004845/resolution-leaking-error
Browse files Browse the repository at this point in the history
  • Loading branch information
lanarimarco authored Nov 14, 2024
2 parents 8b59955 + 019e001 commit 61aa311
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,11 @@ private fun movel(
result = clear(result, valueToApplyMoveType)
}
// overwrite valueToMove from left to right to valueToApplyMove
if (valueToApplyMoveType is BooleanType) valueToMove
else valueToMove + result.substring(valueToMove.length)
when {
valueToApplyMoveType is BooleanType -> valueToMove
valueToApplyMoveType is NumberType && valueToMove.isBlank() -> result
else -> valueToMove + result.substring(valueToMove.length)
}
} else {
// overwrite valueToMove to valueToApplyMove
valueToMove.substring(0, valueToApplyMove.length)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,4 +614,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() {
val expected = listOf("2.200", "2.200", "2.200", "2.200", "2.200", ".001", ".001", ".001", ".000", ".000")
assertEquals(expected, "smeup/MUDRNRAPU00159".outputOf(configuration = smeupConfig))
}

/**
* MOVEL between a DS field without initialization to an integer variable declared inline.
* @see #LS24004842
*/
@Test
fun executeMUDRNRAPU00161() {
val expected = listOf("", "0")
assertEquals(expected, "smeup/MUDRNRAPU00161".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
V* ==============================================================
V* 11/11/2024 APU001 Creation
V* ==============================================================
O * PROGRAM GOAL
O * MOVEL between a DS field without initialization to an
O * integer variable declared inline.
V* ==============================================================
O * JARIKO ANOMALY
O * Before the fix:
O * `Issue executing MoveLStmt at line 19. For input
O * string: " 00000"`
V* ==============================================================
D DS1 DS 3
D DS1_D1 1 3
D TMP S 10

C EVAL TMP=%CHAR(DS1_D1)
C TMP DSPLY
C MOVEL(P) DS1_D1 INVAR 8 0 #Issue executing MoveLStmt at line 19. For input string: " 00000"
C EVAL TMP=%CHAR(INVAR)
C TMP DSPLY

C SETON LR

0 comments on commit 61aa311

Please sign in to comment.