Skip to content

Commit 8dda226

Browse files
Parametrize the version command test for all aliases
1 parent d685651 commit 8dda226

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

src/test/scala/eu/neverblink/jelly/cli/command/VersionSpec.scala

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,12 @@ import org.scalatest.matchers.should.Matchers
44
import org.scalatest.wordspec.AnyWordSpec
55

66
class VersionSpec extends AnyWordSpec, Matchers:
7-
"version command" should {
8-
"print something" in {
9-
val (out, err) = Version.runTestCommand(List("version"))
10-
out should startWith("jelly-cli")
11-
out should include("Jelly-JVM")
12-
out should include("Apache Jena")
7+
for alias <- Seq("version", "v", "--version") do
8+
s"$alias command" should {
9+
"print something" in {
10+
val (out, err) = Version.runTestCommand(List(alias))
11+
out should startWith("jelly-cli")
12+
out should include("Jelly-JVM")
13+
out should include("Apache Jena")
14+
}
1315
}
14-
}
15-
"--version command" should {
16-
"print version" in {
17-
val (out, err) = Version.runTestCommand(List("--version"))
18-
out should startWith("jelly-cli")
19-
out should include("Jelly-JVM")
20-
out should include("Apache Jena")
21-
}
22-
}

0 commit comments

Comments
 (0)