Skip to content

Commit

Permalink
improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Jan 27, 2022
1 parent 51389e6 commit eb1252d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions src/MicroMamba.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ function available(; io::IO=stderr)
try
executable(io=io)
catch
STATE.available = false
end
end
STATE.available
Expand All @@ -113,11 +112,7 @@ the environment variable `JULIA_MICROMAMBA_ROOT_PREFIX`.
function cmd(; io::IO=stderr)
exe = executable(io=io)
root = root_dir()
if root == ""
`$exe`
else
`$exe -r $root`
end
`$exe -r $root`
end
cmd(args; io::IO=stderr) = `$(cmd(io=io)) $args`

Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ using Test
@testset "MicroMamba" begin
@test MicroMamba.available()
@test isfile(MicroMamba.executable())
MicroMamba.STATE.version = VersionNumber(0)
MicroMamba.STATE.executable = ""
@test MicroMamba.version() isa VersionNumber
help = read(MicroMamba.cmd(`--help`), String)
@test occursin("--help", help)
Expand Down

2 comments on commit eb1252d

@cjdoris
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/53276

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.4 -m "<description of version>" eb1252d81a678ca0c7bb93bb9d02773035fc5e24
git push origin v0.1.4

Please sign in to comment.