Skip to content

Commit 19ecd1e

Browse files
committed
Add tests for bitcoin-tx input checking
1 parent 21704f6 commit 19ecd1e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/util/data/bitcoin-util-test.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,38 @@
7676
"output_cmp": "tt-locktime317000-out.json",
7777
"description": "Adds an nlocktime to a transaction (output in json)"
7878
},
79+
{ "exec": "./bitcoin-tx",
80+
"args":
81+
["-create",
82+
"outaddr=1"],
83+
"return_code": 1,
84+
"error_txt": "error: TX output missing or too many separators",
85+
"description": "Malformed outaddr argument (no address specified). Expected to fail."
86+
},
87+
{ "exec": "./bitcoin-tx",
88+
"args":
89+
["-create",
90+
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
91+
"return_code": 1,
92+
"error_txt": "error: TX output missing or too many separators",
93+
"description": "Malformed outaddr argument (too many separators). Expected to fail."
94+
},
95+
{ "exec": "./bitcoin-tx",
96+
"args":
97+
["-create",
98+
"outpubkey=0"],
99+
"return_code": 1,
100+
"error_txt": "error: TX output missing or too many separators",
101+
"description": "Malformed outpubkey argument (no pubkey specified). Expected to fail."
102+
},
103+
{ "exec": "./bitcoin-tx",
104+
"args":
105+
["-create",
106+
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
107+
"return_code": 1,
108+
"error_txt": "error: TX output missing or too many separators",
109+
"description": "Malformed outpubkey argument (too many separators). Expected to fail."
110+
},
79111
{ "exec": "./bitcoin-tx",
80112
"args":
81113
["-create",

0 commit comments

Comments
 (0)