Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 20, 2022
1 parent 1697b0d commit 4b05286
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/ex_doc/language.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ defmodule ExDoc.Language do
%{
line: non_neg_integer() | nil,
specs: [spec_ast()],
doc_fallback: (() -> ExDoc.DocAST.t()) | nil,
doc_fallback: (-> ExDoc.DocAST.t()) | nil,
extra_annotations: [String.t()]
}
| :skip
Expand Down
40 changes: 36 additions & 4 deletions test/ex_doc/cli_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,46 @@ defmodule ExDoc.CLITest do

test "minimum command-line options" do
{[html, epub], _io} = run(["ExDoc", "1.2.3", @ebin])
assert html == {"ExDoc", "1.2.3", [formatter: "html", formatters: ["html", "epub"], apps: [:ex_doc], source_beam: @ebin]}
assert epub == {"ExDoc", "1.2.3", [formatter: "epub", formatters: ["html", "epub"], apps: [:ex_doc], source_beam: @ebin]}

assert html ==
{"ExDoc", "1.2.3",
[
formatter: "html",
formatters: ["html", "epub"],
apps: [:ex_doc],
source_beam: @ebin
]}

assert epub ==
{"ExDoc", "1.2.3",
[
formatter: "epub",
formatters: ["html", "epub"],
apps: [:ex_doc],
source_beam: @ebin
]}
end

test "formatter option" do
{[epub, html], _io} = run(["ExDoc", "1.2.3", @ebin, "-f", "epub", "-f", "html"])
assert epub == {"ExDoc", "1.2.3", [formatter: "epub", formatters: ["epub", "html"], apps: [:ex_doc], source_beam: @ebin]}
assert html == {"ExDoc", "1.2.3", [formatter: "html", formatters: ["epub", "html"], apps: [:ex_doc], source_beam: @ebin]}

assert epub ==
{"ExDoc", "1.2.3",
[
formatter: "epub",
formatters: ["epub", "html"],
apps: [:ex_doc],
source_beam: @ebin
]}

assert html ==
{"ExDoc", "1.2.3",
[
formatter: "html",
formatters: ["epub", "html"],
apps: [:ex_doc],
source_beam: @ebin
]}
end

test "version" do
Expand Down

0 comments on commit 4b05286

Please sign in to comment.