mirror of https://github.com/ConsenSys/mythril
Handle CRLF line endings (#1637)
* Handle CRLF line endings * Add new line at the end of filepull/1639/head
parent
c65340a328
commit
ca0edd6208
@ -0,0 +1,16 @@ |
||||
import pytest |
||||
import json |
||||
import sys |
||||
|
||||
from subprocess import check_output, STDOUT |
||||
from tests import PROJECT_DIR, TESTDATA |
||||
|
||||
MYTH = str(PROJECT_DIR / "myth") |
||||
|
||||
|
||||
def test_positive_solc_settings(): |
||||
file_path = str(TESTDATA / "input_contracts" / "destruct_crlf.sol") |
||||
|
||||
command = f"python3 {MYTH} analyze {file_path} --solv 0.5.0" |
||||
output = check_output(command, shell=True, stderr=STDOUT).decode("UTF-8") |
||||
assert "selfdestruct(addr)" in output |
@ -0,0 +1,10 @@ |
||||
pragma solidity ^0.5.0; |
||||
|
||||
|
||||
contract Suicide { |
||||
|
||||
function kill(address payable addr) public { |
||||
selfdestruct(addr); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue