@@ -345,6 +345,21 @@ title "gix commit-graph"
345
345
}
346
346
)
347
347
)
348
+ (with " an ambiguous ssh username which could be mistaken for an argument"
349
+ snapshot=" $snapshot /fail-ambiguous-username"
350
+ (with " explicit ssh (true url with scheme)"
351
+ it " fails without trying to pass it to command-line programs" && {
352
+ WITH_SNAPSHOT=" $snapshot /explicit-ssh" \
353
+ expect_run $WITH_FAILURE " $exe_plumbing " free pack receive ' ssh://-Fconfigfile@foo/bar'
354
+ }
355
+ )
356
+ (with " implicit ssh (special syntax with no scheme)"
357
+ it " fails without trying to pass it to command-line programs" && {
358
+ WITH_SNAPSHOT=" $snapshot /implicit-ssh" \
359
+ expect_run $WITH_FAILURE " $exe_plumbing " free pack receive -- ' -Fconfigfile@foo:bar/baz'
360
+ }
361
+ )
362
+ )
348
363
(with " an ambiguous ssh host which could be mistaken for an argument"
349
364
it " fails without trying to pass it to command-line programs" && {
350
365
WITH_SNAPSHOT=" $snapshot /fail-ambiguous-host" \
@@ -370,6 +385,21 @@ title "gix commit-graph"
370
385
if test " $kind " = " max" || test " $kind " = " max-pure" ; then
371
386
(with " the 'clone' sub-command"
372
387
snapshot=" $snapshot /clone"
388
+ (with " an ambiguous ssh username which could be mistaken for an argument"
389
+ snapshot=" $snapshot /fail-ambiguous-username"
390
+ (with " explicit ssh (true url with scheme)"
391
+ it " fails without trying to pass it to command-line programs" && {
392
+ WITH_SNAPSHOT=" $snapshot /explicit-ssh" \
393
+ expect_run $WITH_FAILURE " $exe_plumbing " clone ' ssh://-Fconfigfile@foo/bar'
394
+ }
395
+ )
396
+ (with " implicit ssh (special syntax with no scheme)"
397
+ it " fails without trying to pass it to command-line programs" && {
398
+ WITH_SNAPSHOT=" $snapshot /implicit-ssh" \
399
+ expect_run $WITH_FAILURE " $exe_plumbing " clone -- ' -Fconfigfile@foo:bar/baz'
400
+ }
401
+ )
402
+ )
373
403
(with " an ambiguous ssh host which could be mistaken for an argument"
374
404
it " fails without trying to pass it to command-line programs" && {
375
405
WITH_SNAPSHOT=" $snapshot /fail-ambiguous-host" \
0 commit comments