@@ -94,18 +94,30 @@ using Test
9494 @test Sys. which (flagsexename) == nothing
9595 end
9696
97- # https://github.com/JuliaLang/Pkg.jl/issues/4258
98- Pkg. Apps. add (path = path)
99- Pkg. Apps. develop (path = path)
97+ # Test both absolute path and relative path "." work for develop
98+ # https://github.com/JuliaLang/Pkg.jl/issues/4258 and #4480
99+ for test_path in [path, " ." ]
100+ if test_path == " ."
101+ cd (path) do
102+ Pkg. Apps. develop (path = test_path)
103+ end
104+ else
105+ Pkg. Apps. develop (path = test_path)
106+ end
100107
101- # Verify that dev does not create an app environment directory
102- app_env_dir = joinpath (first (DEPOT_PATH ), " environments" , " apps" , " Rot13" )
103- @test ! isdir (app_env_dir)
108+ # Verify that dev does not create an app environment directory
109+ app_env_dir = joinpath (first (DEPOT_PATH ), " environments" , " apps" , " Rot13" )
110+ @test ! isdir (app_env_dir)
104111
105- # Verify that changes to the dev'd package are immediately reflected
106- mv (joinpath (path, " src" , " Rot13_edited.jl" ), joinpath (path, " src" , " Rot13.jl" ); force = true )
107- withenv (" PATH" => string (joinpath (first (DEPOT_PATH ), " bin" ), sep, current_path)) do
108- @test read (` $exename test` , String) == " Updated!\n "
112+ # Verify that changes to the dev'd package are immediately reflected (only test once)
113+ if test_path == path
114+ mv (joinpath (path, " src" , " Rot13_edited.jl" ), joinpath (path, " src" , " Rot13.jl" ); force = true )
115+ withenv (" PATH" => string (joinpath (first (DEPOT_PATH ), " bin" ), sep, current_path)) do
116+ @test read (` $exename test` , String) == " Updated!\n "
117+ end
118+ end
119+
120+ Pkg. Apps. rm (" Rot13" )
109121 end
110122 end
111123 end
0 commit comments