diff options
author | chriseth <chris@ethereum.org> | 2018-10-04 20:55:02 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-12 21:15:01 +0800 |
commit | 6daeb39ecc7ffd0e834e63f6495442c4211c5c1c (patch) | |
tree | 670349dc15db2f9be5210f4ad2c99a386c079168 /test/cmdlineTests.sh | |
parent | 5f5dc8956d39ab19c5408aa4c39a3cd10d3a2dec (diff) | |
download | dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.gz dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.bz2 dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.lz dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.xz dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.zst dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.zip |
Use hash for library placeholders.
Diffstat (limited to 'test/cmdlineTests.sh')
-rwxr-xr-x | test/cmdlineTests.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 71866bce..20254ef4 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -233,6 +233,24 @@ echo '' | "$SOLC" - --link --libraries a:0x90f20564390eAe531E810af625A22f51385Cd printTask "Testing long library names..." echo '' | "$SOLC" - --link --libraries aveeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerylonglibraryname:0x90f20564390eAe531E810af625A22f51385Cd222 >/dev/null +printTask "Testing linking itself..." +SOLTMPDIR=$(mktemp -d) +( + cd "$SOLTMPDIR" + set -e + echo 'library L { function f() public pure {} } contract C { function f() public pure { L.f(); } }' > x.sol + "$SOLC" --bin -o . x.sol 2>/dev/null + # Explanation and placeholder should be there + grep -q '//' C.bin && grep -q '__' C.bin + # But not in library file. + grep -q -v '[/_]' L.bin + # Now link + "$SOLC" --link --libraries x.sol:L:0x90f20564390eAe531E810af625A22f51385Cd222 C.bin + # Now the placeholder and explanation should be gone. + grep -q -v '[/_]' C.bin +) +rm -rf "$SOLTMPDIR" + printTask "Testing overwriting files..." SOLTMPDIR=$(mktemp -d) ( |