test.sh: handle variances in bitcoin-cli formatting.

In particular, there may or may not be a space between "pubkey" and :.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2015-06-30 12:34:35 +09:30
parent 8f4426e09b
commit f38382fd3c

View File

@ -6,7 +6,7 @@ set -e
getpubkey() getpubkey()
{ {
$CLI validateaddress $1 | sed -n 's/.*"pubkey" : "\([0-9a-f]*\)".*/\1/p' $CLI validateaddress $1 | sed -n 's/.*"pubkey" *: "\([0-9a-f]*\)".*/\1/p'
} }
getprivkey() getprivkey()