1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 23:53:19 +08:00

test-lib: improve test_check_peerid

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
Christian Couder
2015-09-12 19:27:55 +02:00
parent e22cbcec27
commit 6e59b39b74

View File

@ -346,6 +346,10 @@ generic_stat() {
} }
test_check_peerid() { test_check_peerid() {
test $(echo "$1" | tr -dC "[:alnum:]" | wc -c | tr -d " ") = "46" peeridlen=$(echo "$1" | tr -dC "[:alnum:]" | wc -c | tr -d " ") &&
test "$peeridlen" = "46" || {
echo "Bad peerid '$1' with len '$peeridlen'"
return 1
}
} }