74 | @@ -75,6 +75,7 @@ BOOST_AUTO_TEST_CASE(rpc_rawparams)
75 | BOOST_CHECK_THROW(CallRPC("sendrawtransaction null"), std::runtime_error);
76 | BOOST_CHECK_THROW(CallRPC("sendrawtransaction DEADBEEF"), std::runtime_error);
77 | BOOST_CHECK_THROW(CallRPC(std::string("sendrawtransaction ")+rawtx+" extra"), std::runtime_error);
78 | + BOOST_CHECK_THROW(CallRPC(std::string("dumptxoutset utxo.dat`")), std::runtime_error);
Why does this generate a runtime error?
I might be wrong but I think this test is for utility (no side-effects) RPCs only; no utxo set has been set up here, so I think this is unsafe
Well, I am unsure why it generates a runtime error, but I actually expected it to be generated because the file name is wrong. However, if a runtime error should not happen here, maybe I should look into it.
Isn't ` a valid filename character on pretty much all OSes?
That was not really my point though; I don't think this is the place to test this. The functional test is. I'd just remove this line.
I think that's very much overkill. The filename only needs to be valid for the OS bitcoind is running on. Looking at that table, portable_posix_name (which is implied by portable_name) rules out using non-ASCII characters which is not good for internationalization!
Well, then I could use function native for that. My idea was to have a check that takes care of allowing only such names where one could create a file that could be copied to/from any OS. But, if this is too much I will make it less strict.
The problem is that boost's definition of "any OS" is way too broad. It would at most need to be compatible with modern operating systems that bitcoind runs on, not 80's UNIX or DOS.
In any case, .native is better here.