Skip to content

Commit

Permalink
Add tests to reproduce problem with expression containing mult operat…
Browse files Browse the repository at this point in the history
…or without space
  • Loading branch information
lanarimarco committed Jan 26, 2024
1 parent f9fca84 commit b6ea814
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.smeup.rpgparser.parsing

import com.smeup.rpgparser.AbstractTest
import com.smeup.rpgparser.assertCanBeParsed
import com.smeup.rpgparser.assertCanBeParsedResult
import org.junit.Test

class RpgParserSmokeTest : AbstractTest() {
Expand Down Expand Up @@ -230,4 +231,16 @@ class RpgParserSmokeTest : AbstractTest() {
val inputStream = pgm.byteInputStream()
assertCanBeParsed(inputStream = inputStream, false)
}

@Test
fun multExprNoSpaceKo() {
val pgm = " C EVAL N1=SCALA*SCALA"
assertCanBeParsedResult(exampleName = "sample", inputStream = pgm.byteInputStream(), printTree = true)
}

@Test
fun multExprNoSpaceOk() {
val pgm = " C EVAL N1=SCALA * SCALA"
assertCanBeParsedResult(exampleName = "sample", inputStream = pgm.byteInputStream(), printTree = true)
}
}

0 comments on commit b6ea814

Please sign in to comment.