diff --git a/src/main/scala/eu/neverblink/jelly/cli/command/Version.scala b/src/main/scala/eu/neverblink/jelly/cli/command/Version.scala index c9c75f7..263fce5 100644 --- a/src/main/scala/eu/neverblink/jelly/cli/command/Version.scala +++ b/src/main/scala/eu/neverblink/jelly/cli/command/Version.scala @@ -15,6 +15,7 @@ object Version extends JellyCommand[VersionOptions]: override def names: List[List[String]] = List( List("version"), List("v"), + List("--version"), ) override def doRun(options: VersionOptions, remainingArgs: RemainingArgs): Unit = diff --git a/src/test/scala/eu/neverblink/jelly/cli/command/VersionSpec.scala b/src/test/scala/eu/neverblink/jelly/cli/command/VersionSpec.scala index 212172b..bd3e9b3 100644 --- a/src/test/scala/eu/neverblink/jelly/cli/command/VersionSpec.scala +++ b/src/test/scala/eu/neverblink/jelly/cli/command/VersionSpec.scala @@ -4,11 +4,12 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class VersionSpec extends AnyWordSpec, Matchers: - "version command" should { - "print something" in { - val (out, err) = Version.runTestCommand(List("version")) - out should startWith("jelly-cli") - out should include("Jelly-JVM") - out should include("Apache Jena") + for alias <- Seq("version", "v", "--version") do + s"$alias command" should { + "print something" in { + val (out, err) = Version.runTestCommand(List(alias)) + out should startWith("jelly-cli") + out should include("Jelly-JVM") + out should include("Apache Jena") + } } - }