Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed Sep 6, 2020
2 parents 054af73 + 9d5a4f6 commit e3d7af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/tools/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ function validate_toml(mod, configs)
haskey(configs, "name") || error("missing key \"name\" in Comonicon.toml or kwargs")
got = configs["name"]
exp = Types.cmd_name(mod.CASTED_COMMANDS["main"])
got == exp ||
error("field name must be the same with entry name, expect $exp got $got")
got == exp || error("field name must be the same with entry name, expect $exp got $got")

_check(configs["install"], "compile") do x
x in [nothing, "min", "no", "all", "yes"]
Expand Down
11 changes: 3 additions & 8 deletions test/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,10 @@ using ..Comonicon

end

configs = Dict(
"name" => "foo",
"completion" => true,
"quiet" => false,
"compile" => "min",
"optimize" => 2
)
configs =
Dict("name" => "foo", "completion" => true, "quiet" => false, "compile" => "min", "optimize" => 2)


@testset "#48" begin
@test_throws ErrorException Comonicon.BuildTools.validate_toml(PR48, configs)
@test_throws ErrorException Comonicon.BuildTools.validate_toml(PR48, configs)
end

0 comments on commit e3d7af7

Please sign in to comment.