Skip to content

Commit

Permalink
Made STDSUNQUALIFIED1 test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Jan 24, 2025
1 parent 40a45b0 commit a01bdf0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import com.smeup.rpgparser.db.utilities.DBServer
import com.smeup.rpgparser.execution.*
import com.smeup.rpgparser.execution.ConnectionConfig
import com.smeup.rpgparser.execution.SimpleReloadConfig
import junit.framework.TestCase.assertEquals
import kotlin.test.BeforeTest
import kotlin.test.Test

/**
* The purpose of this test suite is to validate the behaviour around Symbol Table, directly or not.
Expand Down Expand Up @@ -51,4 +53,15 @@ class SymbolTableTest : AbstractTest() {
}),
metadataProducer = { dbFile: String -> reloadConfig.getMetadata(dbFile = dbFile) })
}

/**
* In this test we have a Data Structure declared as not `QUALIFIED` by using `EXTNAME` keyword.
* When I use a set (by `EVAL`) for a field without dot notation, the parent DS must be find in parent
* of Symbol Table.
*/
@Test
fun executeSTDSUNQUALIFIED1() {
val expected = listOf("FOO")
assertEquals(expected, "symboltable/STDSUNQUALIFIED1".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
V* ==============================================================
V* 24/11/2024 APU001 Creation
V* ==============================================================
O * PROGRAM GOAL
O * In this test we have a Data Structure declared as not
O * `QUALIFIED` by using `EXTNAME` keyword.
O * When I use a set (by `EVAL`) for a field without dot notation,
O * the parent DS must be find in parent of Symbol Table.
V* ==============================================================
D DS1 E DS EXTNAME(ST01) INZ

C EVAL ST01_COL1='FOO'
C ST01_COL1 DSPLY

C SETON LR

0 comments on commit a01bdf0

Please sign in to comment.