Skip to content

Commit

Permalink
Added failing heredoc test case
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBakerEffendi committed May 24, 2024
1 parent 03fdcd5 commit f9d720d
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HereDocTests extends RubyCode2CpgFixture {
}
}

"HereDoc as function argument" should {
"HereDoc as a literal assignment" should {
val cpg = code("""
|def foo()
| a = <<-SQL
Expand Down Expand Up @@ -64,4 +64,16 @@ class HereDocTests extends RubyCode2CpgFixture {
}
}

"HereDoc as a function argument" ignore {
val cpg = code("""
|def foo(arg)
| bar(arg, <<-SOME_HEREDOC, arg + 1)
| inside here doc
| SOME_HEREDOC
|end
|""".stripMargin)

// TODO: This creates a syntax error
}

}

0 comments on commit f9d720d

Please sign in to comment.