diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-06-24 09:41:48 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-06-24 09:42:07 +0200 |
commit | a196c89317dd876c22c8b4556f5af3ecfa251119 (patch) | |
tree | a83cad1cfc8709162d44043adc7080ce0de25b75 /test | |
parent | 7317e14a44c6efc545e6fb9bcedee7174e93a8fa (diff) | |
parent | fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce (diff) | |
download | bitcoin-a196c89317dd876c22c8b4556f5af3ecfa251119.tar.xz |
Merge bitcoin/bitcoin#22270: test: Add bitcoin-util tests (+refactors)
fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce refactor: Pass grind args vector as const reference (MarcoFalke)
fa08bc288f81dd42a482e2bfef37d21a1e5fddd2 Remove gArgs from AppInitUtil (MarcoFalke)
fa751a47ff4253f58518d7f43d33ec1227ea0dbc Remove unused OptionsCategory arg from AddCommand (MarcoFalke)
fa3c1eee7ff2646e78540d53b4f8eaf095a8c27d Remove unused includes from bitcoin-util (MarcoFalke)
fa304929e2c3583bc3e6b05eaa6e0df6cdac6ec8 test: Add bitcoin-util tests (MarcoFalke)
fa831e709a4d605a18e5de1627b48d670bb326fb build_msvc: Add bitcoin-util.exe (MarcoFalke)
Pull request description:
bitcoin-util has no tests
See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%)
ACKs for top commit:
klementtan:
Code review and tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce
theStack:
Tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce
jamesob:
reACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce ([`jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te))
Tree-SHA512: 68e2791239bc48d28fbb6394155c39ea0357a96ec7e4896ca579feeef1a803657165a0ef9fa3cf6e2a381e5b0ca0dafa1b594158303a04997db784201d8dd66d
Diffstat (limited to 'test')
-rw-r--r-- | test/util/data/bitcoin-util-test.json | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/util/data/bitcoin-util-test.json b/test/util/data/bitcoin-util-test.json index 0a9846b4be..a648c0287a 100644 --- a/test/util/data/bitcoin-util-test.json +++ b/test/util/data/bitcoin-util-test.json @@ -1,4 +1,34 @@ [ + { "exec": "./bitcoin-util", + "args": ["foo"], + "return_code": 1, + "error_txt": "Error parsing command line arguments: Invalid command 'foo'", + "description": "" + }, + { "exec": "./bitcoin-util", + "args": ["help"], + "return_code": 1, + "error_txt": "Error parsing command line arguments: Invalid command 'help'", + "description": "`help` raises an error. Use `-help`" + }, + { "exec": "./bitcoin-util", + "args": ["grind"], + "return_code": 1, + "error_txt": "Must specify block header to grind", + "description": "" + }, + { "exec": "./bitcoin-util", + "args": ["grind", "1", "2"], + "return_code": 1, + "error_txt": "Must specify block header to grind", + "description": "" + }, + { "exec": "./bitcoin-util", + "args": ["grind", "aa"], + "return_code": 1, + "error_txt": "Could not decode block header", + "description": "" + }, { "exec": "./bitcoin-tx", "args": ["-create", "nversion=1"], "output_cmp": "blanktxv1.hex", |