@@ -663,6 +663,8 @@ forgetest_init!(can_prioritise_closer_lib_remappings, |prj, cmd| {
663
663
// remapping.
664
664
// See <https://github.com/foundry-rs/foundry/issues/9146>
665
665
// Test that
666
+ // - single file remapping is properly added, see
667
+ // <https://github.com/foundry-rs/foundry/issues/6706> and <https://github.com/foundry-rs/foundry/issues/8499>
666
668
// - project defined `@openzeppelin/contracts` remapping is added
667
669
// - library defined `@openzeppelin/contracts-upgradeable` remapping is added
668
670
// - library defined `@openzeppelin/contracts/upgradeable` remapping is not added as it conflicts
@@ -672,6 +674,7 @@ forgetest_init!(can_prioritise_project_remappings, |prj, cmd| {
672
674
let mut config = cmd. config( ) ;
673
675
// Add `@utils/` remapping in project config.
674
676
config. remappings = vec![
677
+ Remapping :: from_str( "@utils/libraries/Contract.sol=src/Contract.sol" ) . unwrap( ) . into( ) ,
675
678
Remapping :: from_str( "@utils/=src/" ) . unwrap( ) . into( ) ,
676
679
Remapping :: from_str( "@openzeppelin/contracts=lib/openzeppelin-contracts/" ) . unwrap( ) . into( ) ,
677
680
] ;
@@ -699,6 +702,7 @@ forgetest_init!(can_prioritise_project_remappings, |prj, cmd| {
699
702
700
703
cmd. args( [ "remappings" , "--pretty" ] ) . assert_success( ) . stdout_eq( str ![ [ r#"
701
704
Global:
705
+ - @utils/libraries/Contract.sol=src/Contract.sol
702
706
- @utils/=src/
703
707
- @openzeppelin/contracts/=lib/openzeppelin-contracts/
704
708
- @openzeppelin/contracts-upgradeable/=lib/dep1/lib/openzeppelin-upgradeable/
0 commit comments