Skip to content

Commit

Permalink
t5505-remote.sh: check the behavior without a subcommand
Browse files Browse the repository at this point in the history
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  • Loading branch information
szeder authored and avar committed Jul 19, 2022
1 parent c40c48e commit e8eebd4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/t5505-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,17 @@ test_expect_success 'add invalid foreign_vcs remote' '
test_cmp expect actual
'

test_expect_success 'without subcommand' '
git -C test remote >actual &&
echo origin >expect &&
test_cmp expect actual
'

test_expect_success 'without subcommand doesnt take arguments' '
test_expect_code 129 git -C test remote origin 2>err &&
grep "^error: Unknown subcommand:" err
'

cat >test/expect <<EOF
* remote origin
Fetch URL: $(pwd)/one
Expand Down

0 comments on commit e8eebd4

Please sign in to comment.