From e8eebd4eef6b74a5b94d30ba118dcbdb26de53cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Sun, 7 Nov 2021 20:36:10 +0100 Subject: [PATCH] t5505-remote.sh: check the behavior without a subcommand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SZEDER Gábor Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5505-remote.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 6c7370f87f5e4e..79cfae3acbaa7f 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -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 <