@@ -20,6 +20,7 @@ val usageMessage = """
2020 |The <validation-command> should be one of:
2121 |* compile <arg1> <arg2> ...
2222 |* run <arg1> <arg2> ...
23+ |* test <arg1> <arg2> ...
2324 |* <custom-validation-script-path>
2425 |
2526 |The arguments for 'compile' and 'run' should be paths to the source file(s) and optionally additional options passed directly to scala-cli.
@@ -100,20 +101,24 @@ object ScriptOptions:
100101enum ValidationCommand :
101102 case Compile (args : Seq [String ])
102103 case Run (args : Seq [String ])
104+ case Test (args : Seq [String ])
103105 case CustomValidationScript (scriptFile : File )
104106
105107 def validationScript : File = this match
106108 case Compile (args) =>
107109 ValidationScript .tmpScalaCliScript(command = " compile" , args)
108110 case Run (args) =>
109111 ValidationScript .tmpScalaCliScript(command = " run" , args)
112+ case Test (args) =>
113+ ValidationScript .tmpScalaCliScript(command = " test" , args)
110114 case CustomValidationScript (scriptFile) =>
111115 ValidationScript .copiedFrom(scriptFile)
112116
113117object ValidationCommand :
114118 def fromArgs (args : Seq [String ]) = args match
115119 case Seq (" compile" , commandArgs* ) => Compile (commandArgs)
116120 case Seq (" run" , commandArgs* ) => Run (commandArgs)
121+ case Seq (" test" , commandArgs* ) => Test (commandArgs)
117122 case Seq (path) => CustomValidationScript (new File (path))
118123
119124
0 commit comments