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