aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-01-04 19:58:29 +0800
committerGitHub <noreply@github.com>2018-01-04 19:58:29 +0800
commit8901b389595ce723336815c542c16b487b88eb4f (patch)
tree92cc830eec2878add3c468c6486934f631a29dab /test/libsolidity
parenta0771691ff1a8ea8b2dda07ff50e48fc81a2a705 (diff)
parentff9fdfac57d8807399b1b1ddd5c69a819349251f (diff)
downloaddexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar.gz
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar.bz2
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar.lz
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar.xz
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.tar.zst
dexon-solidity-8901b389595ce723336815c542c16b487b88eb4f.zip
Merge pull request #3369 from ethereum/jsonio-colon
Properly handle colons in file names within jsonio
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/StandardCompiler.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp
index dd0478c5..fa0f1e59 100644
--- a/test/libsolidity/StandardCompiler.cpp
+++ b/test/libsolidity/StandardCompiler.cpp
@@ -451,6 +451,36 @@ BOOST_AUTO_TEST_CASE(output_selection_dependent_contract_with_import)
BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[{\"constant\":false,\"inputs\":[],\"name\":\"f\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]");
}
+BOOST_AUTO_TEST_CASE(filename_with_colon)
+{
+ char const* input = R"(
+ {
+ "language": "Solidity",
+ "settings": {
+ "outputSelection": {
+ "http://github.com/ethereum/solidity/std/StandardToken.sol": {
+ "A": [
+ "abi"
+ ]
+ }
+ }
+ },
+ "sources": {
+ "http://github.com/ethereum/solidity/std/StandardToken.sol": {
+ "content": "contract A { }"
+ }
+ }
+ }
+ )";
+ Json::Value result = compile(input);
+ BOOST_CHECK(containsAtMostWarnings(result));
+ Json::Value contract = getContractResult(result, "http://github.com/ethereum/solidity/std/StandardToken.sol", "A");
+ BOOST_CHECK(contract.isObject());
+ BOOST_CHECK(contract["abi"].isArray());
+ BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[]");
+}
+
+
BOOST_AUTO_TEST_SUITE_END()
}