diff --git a/test/gen/Makefile b/test/gen/Makefile index 5a6035e..fab65f6 100644 --- a/test/gen/Makefile +++ b/test/gen/Makefile @@ -1,8 +1,9 @@ +SHELL := /bin/bash SCRYPT_DIR=../../node_modules/triplesec/contrib/scrypt-1.1.6 SCRYPT=${SCRYPT_DIR}/scrypt PBKDF2=./pbkdf2.py -BU=py-venv/bin/bu +KU=py-venv/bin/ku build: build-scrypt build-python @@ -17,6 +18,6 @@ input: iced gen_input.iced > input.json spec: - (source py-venv/bin/activate && iced gen_spec.iced ${SCRYPT} ${PBKDF2} ${BU} > ../spec.json) + (source py-venv/bin/activate && iced gen_spec.iced ${SCRYPT} ${PBKDF2} ${KU} > ../spec.json) .PHONY: build-scrypt build-python build diff --git a/test/gen/gen_spec.iced b/test/gen/gen_spec.iced index a0ba985..240cbf2 100644 --- a/test/gen/gen_spec.iced +++ b/test/gen/gen_spec.iced @@ -105,14 +105,14 @@ class Runner for line in out.join("\n").split(/\n+/) when line.length [key,val] = line.split(/:\s+/) if key[0] is ' ' - bu_out[last_key][key.replace(/\s+/, '')] = val + bu_out[last_key][key.replace(/^\s+|\s+$/g, '')] = val else - last_key = key - bu_out[key] = { _ : val} + last_key = key.replace(/\s+$/, '') + bu_out[last_key] = { "value" : val} cb { - "private" : bu_out.WIF.uncompressed - "public" : bu_out['Bitcoin address'].uncompressed + "private" : bu_out.wif.uncompressed + "public" : bu_out['Bitcoin address uncompressed'].value } #-------------------