@@ -230,7 +230,7 @@ func TestLaunchHostAppDryRunOpenai(t *testing.T) {
230230
231231 cli := hostApp {envFn : openaiEnv (openaiPathSuffix )}
232232 // Use "ls" as a bin that exists in PATH
233- err := launchHostApp (cmd , "ls" , testBaseURL , cli , true )
233+ err := launchHostApp (cmd , "ls" , testBaseURL , cli , nil , true )
234234 require .NoError (t , err )
235235
236236 output := buf .String ()
@@ -245,7 +245,7 @@ func TestLaunchHostAppDryRunCodex(t *testing.T) {
245245 cmd := newTestCmd (buf )
246246
247247 cli := hostApp {envFn : openaiEnv ("/v1" )}
248- err := launchHostApp (cmd , "ls" , testBaseURL , cli , true )
248+ err := launchHostApp (cmd , "ls" , testBaseURL , cli , nil , true )
249249 require .NoError (t , err )
250250
251251 output := buf .String ()
@@ -255,12 +255,24 @@ func TestLaunchHostAppDryRunCodex(t *testing.T) {
255255 require .NotContains (t , output , "/engines/v1" )
256256}
257257
258+ func TestLaunchHostAppDryRunWithArgs (t * testing.T ) {
259+ buf := new (bytes.Buffer )
260+ cmd := newTestCmd (buf )
261+
262+ cli := hostApp {envFn : openaiEnv (openaiPathSuffix )}
263+ err := launchHostApp (cmd , "ls" , testBaseURL , cli , []string {"-m" , "ai/qwen3" }, true )
264+ require .NoError (t , err )
265+
266+ output := buf .String ()
267+ require .Contains (t , output , "Would run: ls -m ai/qwen3" )
268+ }
269+
258270func TestLaunchHostAppDryRunAnthropic (t * testing.T ) {
259271 buf := new (bytes.Buffer )
260272 cmd := newTestCmd (buf )
261273
262274 cli := hostApp {envFn : anthropicEnv }
263- err := launchHostApp (cmd , "ls" , testBaseURL , cli , true )
275+ err := launchHostApp (cmd , "ls" , testBaseURL , cli , nil , true )
264276 require .NoError (t , err )
265277
266278 output := buf .String ()
@@ -275,7 +287,7 @@ func TestLaunchHostAppNotFound(t *testing.T) {
275287 cmd := newTestCmd (buf )
276288
277289 cli := hostApp {envFn : openaiEnv (openaiPathSuffix )}
278- err := launchHostApp (cmd , "nonexistent-binary-xyz" , testBaseURL , cli , false )
290+ err := launchHostApp (cmd , "nonexistent-binary-xyz" , testBaseURL , cli , nil , false )
279291 require .Error (t , err )
280292 require .Contains (t , err .Error (), "not found" )
281293
@@ -289,7 +301,7 @@ func TestLaunchHostAppNotFoundNilEnvFn(t *testing.T) {
289301 cmd := newTestCmd (buf )
290302
291303 cli := hostApp {envFn : nil }
292- err := launchHostApp (cmd , "nonexistent-binary-xyz" , testBaseURL , cli , false )
304+ err := launchHostApp (cmd , "nonexistent-binary-xyz" , testBaseURL , cli , nil , false )
293305 require .Error (t , err )
294306
295307 output := buf .String ()
@@ -326,13 +338,13 @@ func TestNewLaunchCmdValidArgs(t *testing.T) {
326338 require .Equal (t , supportedApps , cmd .ValidArgs )
327339}
328340
329- func TestNewLaunchCmdRequiresExactlyOneArg (t * testing.T ) {
341+ func TestNewLaunchCmdRequiresAtLeastOneArg (t * testing.T ) {
330342 cmd := newLaunchCmd ()
331343 cmd .SetArgs ([]string {})
332344 err := cmd .Execute ()
333345
334346 require .Error (t , err )
335- require .Contains (t , err .Error (), "requires 1 argument " )
347+ require .Contains (t , err .Error (), "requires at least 1 arg " )
336348}
337349
338350func TestNewLaunchCmdDispatchContainerApp (t * testing.T ) {
0 commit comments