mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 15:42:21 +08:00
test-lib: improve test_check_peerid
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
@ -346,6 +346,10 @@ generic_stat() {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user