@@ -20,6 +20,7 @@ val usageMessage = """
20
20
|The <validation-command> should be one of:
21
21
|* compile <arg1> <arg2> ...
22
22
|* run <arg1> <arg2> ...
23
+ |* test <arg1> <arg2> ...
23
24
|* <custom-validation-script-path>
24
25
|
25
26
|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:
100
101
enum ValidationCommand :
101
102
case Compile (args : Seq [String ])
102
103
case Run (args : Seq [String ])
104
+ case Test (args : Seq [String ])
103
105
case CustomValidationScript (scriptFile : File )
104
106
105
107
def validationScript : File = this match
106
108
case Compile (args) =>
107
109
ValidationScript .tmpScalaCliScript(command = " compile" , args)
108
110
case Run (args) =>
109
111
ValidationScript .tmpScalaCliScript(command = " run" , args)
112
+ case Test (args) =>
113
+ ValidationScript .tmpScalaCliScript(command = " test" , args)
110
114
case CustomValidationScript (scriptFile) =>
111
115
ValidationScript .copiedFrom(scriptFile)
112
116
113
117
object ValidationCommand :
114
118
def fromArgs (args : Seq [String ]) = args match
115
119
case Seq (" compile" , commandArgs* ) => Compile (commandArgs)
116
120
case Seq (" run" , commandArgs* ) => Run (commandArgs)
121
+ case Seq (" test" , commandArgs* ) => Test (commandArgs)
117
122
case Seq (path) => CustomValidationScript (new File (path))
118
123
119
124
0 commit comments