mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-25 10:27:01 +08:00
sharness: swap test_*cmp arguments
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
@ -24,7 +24,7 @@ test_add_symlinks() {
|
|||||||
|
|
||||||
test_expect_success "output looks good" '
|
test_expect_success "output looks good" '
|
||||||
echo QmWdiHKoeSW8G1u7ATCgpx4yMoUhYaJBQGkyPLkS9goYZ8 > filehash_exp &&
|
echo QmWdiHKoeSW8G1u7ATCgpx4yMoUhYaJBQGkyPLkS9goYZ8 > filehash_exp &&
|
||||||
test_cmp filehash_out filehash_exp
|
test_cmp filehash_exp filehash_out
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "adding a symlink adds the link itself" '
|
test_expect_success "adding a symlink adds the link itself" '
|
||||||
@ -33,7 +33,7 @@ test_add_symlinks() {
|
|||||||
|
|
||||||
test_expect_success "output looks good" '
|
test_expect_success "output looks good" '
|
||||||
echo "QmdocmZeF7qwPT9Z8SiVhMSyKA2KKoA2J7jToW6z6WBmxR" > goodlink_exp &&
|
echo "QmdocmZeF7qwPT9Z8SiVhMSyKA2KKoA2J7jToW6z6WBmxR" > goodlink_exp &&
|
||||||
test_cmp goodlink_out goodlink_exp
|
test_cmp goodlink_exp goodlink_out
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "adding a broken symlink works" '
|
test_expect_success "adding a broken symlink works" '
|
||||||
@ -42,7 +42,7 @@ test_add_symlinks() {
|
|||||||
|
|
||||||
test_expect_success "output looks good" '
|
test_expect_success "output looks good" '
|
||||||
echo "QmWYN8SEXCgNT2PSjB6BnxAx6NJQtazWoBkTRH9GRfPFFQ" > badlink_exp &&
|
echo "QmWYN8SEXCgNT2PSjB6BnxAx6NJQtazWoBkTRH9GRfPFFQ" > badlink_exp &&
|
||||||
test_cmp badlink_out badlink_exp
|
test_cmp badlink_exp badlink_out
|
||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ test_swarm_filter_cmd() {
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "'ipfs swarm filters' output looks good" '
|
test_expect_success "'ipfs swarm filters' output looks good" '
|
||||||
test_sort_cmp list_actual list_expected
|
test_sort_cmp list_expected list_actual
|
||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ test_expect_success "cat that file on node2" '
|
|||||||
test_expect_success "verify files match" '
|
test_expect_success "verify files match" '
|
||||||
multihash filea > expected1 &&
|
multihash filea > expected1 &&
|
||||||
multihash fileb > actual1 &&
|
multihash fileb > actual1 &&
|
||||||
test_cmp actual1 expected1
|
test_cmp expected1 actual1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "shut down nodes" '
|
test_expect_success "shut down nodes" '
|
||||||
|
|||||||
@ -30,7 +30,7 @@ test_expect_success "cat that file on node2" '
|
|||||||
test_expect_success "verify files match" '
|
test_expect_success "verify files match" '
|
||||||
multihash filea > expected1 &&
|
multihash filea > expected1 &&
|
||||||
multihash fileb > actual1 &&
|
multihash fileb > actual1 &&
|
||||||
test_cmp actual1 expected1
|
test_cmp expected1 actual1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "shut down nodes" '
|
test_expect_success "shut down nodes" '
|
||||||
|
|||||||
Reference in New Issue
Block a user