feat: support lateinit var args declaration for hostArgs injection and add coverage

This commit is contained in:
2026-02-25 14:24:37 +08:00
parent c8f4695582
commit e6a993fcf1
4 changed files with 32 additions and 5 deletions

View File

@@ -478,7 +478,7 @@ fun initialScriptTemplate(name: String): String =
// @timeout: 10s
// @param: sample | required=false | default=value | desc=example parameter
val args: Array<String> = emptyArray()
lateinit var args: Array<String>
val kv = args.mapNotNull {
val i = it.indexOf('=')
if (i <= 0) null else it.substring(0, i) to it.substring(i + 1)