Skip to content

Commit

Permalink
showcase usage of different options for the same plugin/output
Browse files Browse the repository at this point in the history
  • Loading branch information
github-brice-jaglin committed Jan 27, 2021
1 parent c8799d8 commit 4ffeb2f
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions bridge/src/test/scala/protocbridge/ProtocBridgeSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,30 @@ class ProtocBridgeSpec extends AnyFlatSpec with Matchers {

run(
Seq(
Target(gens.plugin("foo", "/path/to/plugin"), TmpPath),
Target(gens.plugin("foo", "/otherpath/to/plugin"), TmpPath1),
Target(gens.plugin("foo"), TmpPath2),
Target(gens.plugin("foo", "/path/to/plugin"), TmpPath, Seq("w")),
Target(gens.plugin("foo", "/path/to/plugin"), TmpPath, Seq("x")),
Target(gens.plugin("foo", "/otherpath/to/plugin"), TmpPath1, Seq("y")),
Target(gens.plugin("foo", "/otherpath/to/plugin"), TmpPath2, Seq("y")),
Target(gens.plugin("foo"), TmpPath2, Seq("z")),
Target(gens.plugin("bar"), TmpPath)
)
) must be(
Seq(

"--plugin=protoc-gen-foo_0=/path/to/plugin",
"--plugin=protoc-gen-foo_1=/otherpath/to/plugin",
"--plugin=protoc-gen-foo_1=/path/to/plugin",
"--plugin=protoc-gen-foo_2=/otherpath/to/plugin",
"--plugin=protoc-gen-foo_3=/otherpath/to/plugin",
s"--foo_0_out=$TmpPath",
s"--foo_1_out=$TmpPath1",
s"--foo_2_out=$TmpPath2",
s"--foo_0_opt=w",
s"--foo_1_out=$TmpPath",
s"--foo_1_opt=x",
s"--foo_2_out=$TmpPath1",
s"--foo_2_opt=y",
s"--foo_3_out=$TmpPath2",
s"--foo_3_opt=y",
s"--foo_4_out=$TmpPath2",
s"--foo_4_opt=z",
s"--bar_out=$TmpPath"
)
)
Expand Down

0 comments on commit 4ffeb2f

Please sign in to comment.