Skip to content

Commit

Permalink
Remove open_documentation() command and test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbowly committed Nov 12, 2024
1 parent 18fc3d2 commit 73ccc86
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
27 changes: 0 additions & 27 deletions src/Gurobi_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,4 @@ JLLWrappers.@generate_main_file_header("Gurobi")

JLLWrappers.@generate_main_file("Gurobi", UUID("c018c7e6-a5b0-4aea-8f80-9c1ef9991411"))

function get_documentation_path()
path = @static if Sys.iswindows()
joinpath("Doc", "Gurobi", "refman", "index.html")
else
joinpath("share", "doc", "gurobi", "refman", "index.html")
end
return joinpath(artifact_dir, path)
end

function _browser_command(path::String)
@static if Sys.isapple()
return `open $path`
elseif Sys.iswindows()
return `cmd /c start $path`
else
@assert Sys.islinux()
return `xdg-open $path`
end
end

"""
open_documentation()
Open a local copy of the Gurobi documentation in your browser.
"""
open_documentation() = run(_browser_command(get_documentation_path()))

end # module Gurobi_jll
14 changes: 0 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,3 @@ end
@test startswith(unsafe_string(ret), "No Gurobi license found")
end
end

@testset "open_documentation" begin
@test isfile(Gurobi_jll.get_documentation_path())
if Sys.isapple()
@test Gurobi_jll._browser_command("abc") == `open abc`
Gurobi_jll.open_documentation()
elseif Sys.iswindows()
@test Gurobi_jll._browser_command("abc") == `cmd /c start abc`
Gurobi_jll.open_documentation()
else
@test Gurobi_jll._browser_command("abc") == `xdg-open abc`
# Gurobi_jll.open_documentation() # Errors in CI
end
end

0 comments on commit 73ccc86

Please sign in to comment.