mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Relative paths in import directives.
This commit is contained in:
@@ -76,6 +76,23 @@ BOOST_AUTO_TEST_CASE(circular_import)
|
||||
BOOST_CHECK(c.compile());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(relative_import)
|
||||
{
|
||||
CompilerStack c;
|
||||
c.addSource("a", "import \"./dir/b\"; contract A is B {}");
|
||||
c.addSource("dir/b", "contract B {}");
|
||||
c.addSource("dir/c", "import \"../a\"; contract C is A {}");
|
||||
BOOST_CHECK(c.compile());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(relative_import_multiplex)
|
||||
{
|
||||
CompilerStack c;
|
||||
c.addSource("a", "contract A {}");
|
||||
c.addSource("dir/a/b/c", "import \"../../.././a\"; contract B is A {}");
|
||||
BOOST_CHECK(c.compile());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user