'mortal.sol':{content:'pragma solidity ^0.5.0;\n\ncontract Mortal {\n /* Define variable owner of the type address */\n address payable owner;\n\n /* This function is executed at initialization and sets the owner of the contract */\n function mortal() public { owner = msg.sender; }\n\n /* Function to recover the funds on the contract */\n function kill() public { if (msg.sender == owner) selfdestruct(owner); }\n}\n'},
'greeter.sol':{content:'pragma solidity ^0.5.0;\nimport \'mortal.sol\';\n\ncontract Greeter is Mortal {\n /* Define variable greeting of the type string */\n string greeting;\n\n /* This runs when the contract is executed */\n constructor(string memory _greeting) public {\n greeting = _greeting;\n }\n\n /* Main function */\n function greet() public view returns (string memory) {\n return greeting;\n }\n}\n'}
}
constoutputSelection={
// Enable the metadata and bytecode outputs of every single contract.
describe('test github imports with callback',function(){
letsources={},results={}
sources={
'github_import.sol':{content:'pragma solidity ^0.5.0;\nimport \'https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol\';\n\ncontract SimpleMath {\n using SafeMath for uint;\n}\n'}
}
before(function(done){
constfindImportsSync=function(path){
rr.resolve('./',path).then(function(result){
returnresult
}).catch(function(e){
throwe
})
return{}
}
constoutputSelection={
// Enable the metadata and bytecode outputs of every single contract.
it('should not match file not found error msg',function(){
constmsg="{\"contracts\":{},\"errors\":[{\"component\":\"general\",\"formattedMessage\":\"github_import.sol:2:1: ParserError: Source \\\"https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol\\\" not found: File not found.\\nimport 'https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol';\\n^-------------------------------------------------------------------------------------^\\n\",\"message\":\"Source \\\"https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol\\\" not found: File not found.\",\"severity\":\"error\",\"sourceLocation\":{\"end\":111,\"file\":\"github_import.sol\",\"start\":24},\"type\":\"ParserError\"}],\"sources\":{}}"