File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1034,6 +1034,18 @@ fn test_extern_mod() {
1034
1034
assert ! ( os:: path_exists( & exec_file) && is_executable( & exec_file) ) ;
1035
1035
}
1036
1036
1037
+ #[ test]
1038
+ fn test_import_rustpkg ( ) {
1039
+ let p_id = PkgId :: new ( "foo" ) ;
1040
+ let workspace = create_local_package ( & p_id) ;
1041
+ writeFile ( & workspace. push ( "src" ) . push ( "foo-0.1" ) . push ( "pkg.rs" ) ,
1042
+ "extern mod rustpkg; fn main() {}" ) ;
1043
+ command_line_test ( [ ~"build", ~"foo"] , & workspace) ;
1044
+ debug ! ( "workspace = %s" , workspace. to_str( ) ) ;
1045
+ assert ! ( os:: path_exists( & workspace. push( "build" ) . push( "foo" ) . push( fmt!( "pkg%s" ,
1046
+ os:: EXE_SUFFIX ) ) ) ) ;
1047
+ }
1048
+
1037
1049
/// Returns true if p exists and is executable
1038
1050
fn is_executable ( p : & Path ) -> bool {
1039
1051
use std:: libc:: consts:: os:: posix88:: { S_IXUSR } ;
You can’t perform that action at this time.
0 commit comments