test: add coverage for script parse error in ParseScript

This commit is contained in:
pierrenn 2020-03-27 12:10:31 +09:00
parent 97b0687501
commit dcda81c471
No known key found for this signature in database
GPG key ID: A86129C56F42D009

View file

@ -218,6 +218,12 @@
"output_cmp": "txcreate2.json", "output_cmp": "txcreate2.json",
"description": "Parses a transaction with no inputs and a single output script (output in json)" "description": "Parses a transaction with no inputs and a single output script (output in json)"
}, },
{ "exec": "./bitcoin-tx",
"args": ["-create", "outscript=0:123badscript"],
"return_code": 1,
"error_txt": "error: script parse error",
"description": "Create a new transaction with an invalid output script"
},
{ "exec": "./bitcoin-tx", { "exec": "./bitcoin-tx",
"args": ["-create", "outscript=0:OP_DROP", "nversion=1"], "args": ["-create", "outscript=0:OP_DROP", "nversion=1"],
"output_cmp": "txcreatescript1.hex", "output_cmp": "txcreatescript1.hex",