mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-13 14:41:23 +08:00
t0062: use "$@" directly
This avoids potential quoting problems. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
@ -16,16 +16,14 @@ api_fromcfg=$(ipfs config Addresses.API)
|
||||
peerid=$(ipfs config Identity.PeerID)
|
||||
|
||||
test_client() {
|
||||
args="$@"
|
||||
printf $peerid >expected
|
||||
ipfs $args id -f="<id>" >actual
|
||||
ipfs "$@" id -f="<id>" >actual
|
||||
test_cmp expected actual
|
||||
}
|
||||
|
||||
test_client_must_fail() {
|
||||
args="$@"
|
||||
echo "Error: api not running" >expected_err
|
||||
test_must_fail ipfs $args id -f="<id>" >actual 2>actual_err
|
||||
test_must_fail ipfs "$@" id -f="<id>" >actual 2>actual_err
|
||||
test_cmp expected_err actual_err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user