File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,39 @@ let dir = mktempdir(),
411
411
end
412
412
end
413
413
414
+ # test loading a package with conflicting namespace
415
+ let dir = mktempdir ()
416
+ Test_module = :Test6c92f26
417
+ try
418
+ write (joinpath (dir, " Iterators.jl" ),
419
+ """
420
+ module Iterators
421
+ __precompile__(true)
422
+ end
423
+ """ )
424
+
425
+ write (joinpath (dir, " $Test_module .jl" ),
426
+ """
427
+ module $Test_module
428
+ __precompile__(true)
429
+ using Iterators
430
+ end
431
+ """ )
432
+
433
+ testcode = """
434
+ insert!(LOAD_PATH, 1, $(repr (dir)) )
435
+ insert!(Base.LOAD_CACHE_PATH, 1, $(repr (dir)) )
436
+ using $Test_module
437
+ """
438
+
439
+ exename = ` $(Base. julia_cmd ()) --startup-file=no`
440
+ @test readchomp (` $exename -E $(testcode) ` ) == " nothing"
441
+ @test readchomp (` $exename -E $(testcode) ` ) == " nothing"
442
+ finally
443
+ rm (dir, recursive= true )
444
+ end
445
+ end
446
+
414
447
let module_name = string (" a" ,randstring ())
415
448
insert! (LOAD_PATH , 1 , pwd ())
416
449
file_name = string (module_name, " .jl" )
You can’t perform that action at this time.
0 commit comments