Skip to content

Commit

Permalink
Test on OTP 24 (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach authored Jul 28, 2021
1 parent fcf85ab commit 1671d05
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ jobs:
matrix:
include:
- pair:
elixir: 1.10.4
otp: 21.3.8.21
elixir: "1.10"
otp: 21
- pair:
elixir: 1.11.4
otp: 23.3.3
elixir: "1.11"
otp: 23
- pair:
elixir: "1.12"
otp: 24
lint: lint
steps:
- uses: actions/checkout@v2

- uses: erlef/setup-elixir@v1
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}
Expand Down
17 changes: 13 additions & 4 deletions test/ex_doc/formatter/html/templates_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ defmodule ExDoc.Formatter.HTML.TemplatesTest do
content = Templates.sidebar_template(doc_config(), @empty_nodes_map)

assert content =~
~r{<div class="sidebar-header">\s*<div class="sidebar-projectDetails">\s*<a href="#{
homepage_url()
}" class="sidebar-projectName">\s*Elixir\s*</a>\s*<strong class="sidebar-projectVersion">\s*v1.0.1\s*</strong>\s*</div>\s*</div>}
~r"""
<div class="sidebar-header">\s*\
<div class="sidebar-projectDetails">\s*\
<a href="#{homepage_url()}" class="sidebar-projectName">\s*Elixir\s*</a>\s*\
<strong class="sidebar-projectVersion">\s*v1.0.1\s*</strong>\s*</div>\s*</div>\
"""
end

test "text links to main when there is no homepage_url" do
Expand All @@ -183,7 +186,13 @@ defmodule ExDoc.Formatter.HTML.TemplatesTest do
content = Templates.sidebar_template(config, @empty_nodes_map)

assert content =~
~r{<div class="sidebar-header">\s*<div class="sidebar-projectDetails">\s*<a href="hello.html" class="sidebar-projectName">\s*Elixir\s*</a>\s*<strong class="sidebar-projectVersion">\s*v1.0.1\s*</strong>\s*</div>\s*</div>}
~r"""
<div class="sidebar-header">\s*\
<div class="sidebar-projectDetails">\s*\
<a href="hello.html" class="sidebar-projectName">\s*Elixir\s*</a>\s*\
<strong class="sidebar-projectVersion">\s*v1.0.1\s*</strong>\s*\
</div>\s*</div>\
"""
end

test "enables nav link when module type have at least one element" do
Expand Down

0 comments on commit 1671d05

Please sign in to comment.