зеркало из https://github.com/microsoft/git.git
t9814: simplify convoluted check that command correctly errors out
This test uses a convoluted method to verify that "p4 help" errors out when asked for help about an unknown command. In doing so, it intentionally breaks the &&-chain. Simplify by employing the typical "! command" idiom and a normal &&-chain instead. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
be8c48d4c4
Коммит
794165cb17
|
@ -9,23 +9,11 @@ test_expect_success 'start p4d' '
|
|||
'
|
||||
|
||||
# We rely on this behavior to detect for p4 move availability.
|
||||
test_expect_success 'p4 help unknown returns 1' '
|
||||
test_expect_success '"p4 help unknown" errors out' '
|
||||
(
|
||||
cd "$cli" &&
|
||||
(
|
||||
p4 help client >errs 2>&1
|
||||
echo $? >retval
|
||||
)
|
||||
echo 0 >expected &&
|
||||
test_cmp expected retval &&
|
||||
rm retval &&
|
||||
(
|
||||
p4 help nosuchcommand >errs 2>&1
|
||||
echo $? >retval
|
||||
)
|
||||
echo 1 >expected &&
|
||||
test_cmp expected retval &&
|
||||
rm retval
|
||||
p4 help client &&
|
||||
! p4 help nosuchcommand
|
||||
)
|
||||
'
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче