Skip to content

Commit

Permalink
Merge pull request #548 from smeup/bugfix/LS24002985/file-definition-…
Browse files Browse the repository at this point in the history
…name-cannot-be-empty

Bugfix/ls24002985/file definition name cannot be empty
  • Loading branch information
lanarimarco authored Jun 18, 2024
2 parents 41c0941 + 1b44bd5 commit bc1506c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ internal fun FileDefinition.toDataDefinitions(): List<DataDefinition> {
val dataDefinitions = mutableListOf<DataDefinition>()
val metadata = loadMetadata()

if (internalFormatName == null) internalFormatName = metadata.recordFormat
if (internalFormatName == null) internalFormatName = metadata.recordFormat.ifEmpty { metadata.name }

dataDefinitions.addAll(
metadata.fields.map { dbField ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,14 @@ open class MULANGT02ConstAndDSpecTest : MULANGTTest() {
val expected = listOf("ok")
assertEquals(expected, "smeup/MUDRNRAPU00213".outputOf(configuration = smeupConfig))
}

/**
* FileDefinition on metadata with empty recordFormat
* @see #LS24002985
*/
@Test
fun executeMUDRNRAPU00217() {
val expected = listOf("ok")
assertEquals(expected, "smeup/MUDRNRAPU00217".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
D £DBG_Str S 2
FB£G40EWK IF E K DISK USROPN
C CLOSE B£G40EWK
C EVAL £DBG_Str='ok'
C £DBG_Str DSPLY
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "B£G40EWK",
"tableName": "",
"recordFormat": "",
"fields": [
],
"accessFields": []
}

0 comments on commit bc1506c

Please sign in to comment.