@@ -84,7 +84,7 @@ defmodule ExDoc.Language.ErlangTest do
8484
8585 test "OTP function" , c do
8686 assert autolink_edoc ( "{@link array:new/0}" , c ) ==
87- ~s| <a href="https://www.erlang.org/doc/man/array.html#new- 0"><code>array:new/0</code></a>|
87+ ~s| <a href="https://www.erlang.org/doc/man/array.html#new/ 0"><code>array:new/0</code></a>|
8888 end
8989
9090 test "OTP function when generating OTP docs" , c do
@@ -99,12 +99,12 @@ defmodule ExDoc.Language.ErlangTest do
9999
100100 test "ERTS function" , c do
101101 assert autolink_edoc ( "{@link zlib:gunzip/1}" , c ) ==
102- ~s| <a href="https://www.erlang.org/doc/man/zlib.html#gunzip- 1"><code>zlib:gunzip/1</code></a>|
102+ ~s| <a href="https://www.erlang.org/doc/man/zlib.html#gunzip/ 1"><code>zlib:gunzip/1</code></a>|
103103 end
104104
105105 test "app function" , c do
106106 assert autolink_edoc ( "{@link //stdlib/array:new/0}" , c ) ==
107- ~s| <a href="https://www.erlang.org/doc/man/array.html#new- 0"><code>array:new/0</code></a>|
107+ ~s| <a href="https://www.erlang.org/doc/man/array.html#new/ 0"><code>array:new/0</code></a>|
108108 end
109109
110110 test "external function" , c do
@@ -124,12 +124,12 @@ defmodule ExDoc.Language.ErlangTest do
124124
125125 test "OTP type" , c do
126126 assert autolink_edoc ( "{@link array:array()}" , c ) ==
127- ~s| <a href="https://www.erlang.org/doc/man/array.html#type- array"><code>array:array()</code></a>|
127+ ~s| <a href="https://www.erlang.org/doc/man/array.html#t: array/0 "><code>array:array()</code></a>|
128128 end
129129
130130 test "app type" , c do
131131 assert autolink_edoc ( "{@link //stdlib/array:array()}" , c ) ==
132- ~s| <a href="https://www.erlang.org/doc/man/array.html#type- array"><code>array:array()</code></a>|
132+ ~s| <a href="https://www.erlang.org/doc/man/array.html#t: array/0 "><code>array:array()</code></a>|
133133 end
134134
135135 @ myList ( if :erlang . system_info ( :otp_release ) >= ~c" 27" do
@@ -310,7 +310,7 @@ defmodule ExDoc.Language.ErlangTest do
310310
311311 test "function in module autoimport using slash" , c do
312312 assert autolink_doc ( "`node/0`" , c ) ==
313- ~s| <a href="https://www.erlang.org/doc/man/erlang.html#node- 0"><code class="inline">node/0</code></a>|
313+ ~s| <a href="https://www.erlang.org/doc/man/erlang.html#node/ 0"><code class="inline">node/0</code></a>|
314314 end
315315
316316 test "type in module autoimport" , c do
@@ -320,7 +320,7 @@ defmodule ExDoc.Language.ErlangTest do
320320
321321 test "type in module autoimport using slash" , c do
322322 assert autolink_doc ( "`t:integer/0`" , c ) ==
323- ~s| <a href="https://www.erlang.org/doc/man/erlang.html#type- integer"><code class="inline">integer/0</code></a>|
323+ ~s| <a href="https://www.erlang.org/doc/man/erlang.html#t: integer/0 "><code class="inline">integer/0</code></a>|
324324 end
325325
326326 test "bad function in module code" , c do
@@ -335,7 +335,7 @@ defmodule ExDoc.Language.ErlangTest do
335335
336336 test "linking to auto-imported nil works" , c do
337337 assert autolink_doc ( "[`[]`](`t:nil/0`)" , c ) ==
338- ~s| <a href="https://www.erlang.org/doc/man/erlang.html#type- nil"><code class="inline">[]</code></a>|
338+ ~s| <a href="https://www.erlang.org/doc/man/erlang.html#t: nil/0 "><code class="inline">[]</code></a>|
339339 end
340340
341341 test "linking to local nil works" , c do
@@ -543,7 +543,7 @@ defmodule ExDoc.Language.ErlangTest do
543543
544544 test "OTP function" , c do
545545 assert autolink_extra ( "`lists:reverse/1`" , c ) ==
546- ~s| <a href="https://www.erlang.org/doc/man/lists.html#reverse- 1"><code class="inline">lists:reverse/1</code></a>|
546+ ~s| <a href="https://www.erlang.org/doc/man/lists.html#reverse/ 1"><code class="inline">lists:reverse/1</code></a>|
547547 end
548548
549549 test "type" , c do
@@ -553,7 +553,7 @@ defmodule ExDoc.Language.ErlangTest do
553553
554554 test "OTP type" , c do
555555 assert autolink_extra ( "`t:array:array/0`" , c ) ==
556- ~s| <a href="https://www.erlang.org/doc/man/array.html#type- array"><code class="inline">array:array/0</code></a>|
556+ ~s| <a href="https://www.erlang.org/doc/man/array.html#t: array/0 "><code class="inline">array:array/0</code></a>|
557557 end
558558
559559 test "module" , c do
@@ -684,9 +684,9 @@ defmodule ExDoc.Language.ErlangTest do
684684
685685 test "spec when fun is called record" , c do
686686 assert autolink_spec ( "-spec record(module()) -> [[{module(), atom()}]]." , c ) ==
687- ~s| record(<a href="https://www.erlang.org/doc/man/erlang.html#type- module">module</a>())| <>
688- ~s| -> [[{<a href="https://www.erlang.org/doc/man/erlang.html#type- module">module</a>(),| <>
689- ~s| <a href="https://www.erlang.org/doc/man/erlang.html#type- atom">atom</a>()}]].|
687+ ~s| record(<a href="https://www.erlang.org/doc/man/erlang.html#t: module/0 ">module</a>())| <>
688+ ~s| -> [[{<a href="https://www.erlang.org/doc/man/erlang.html#t: module/0 ">module</a>(),| <>
689+ ~s| <a href="https://www.erlang.org/doc/man/erlang.html#t: atom/0 ">atom</a>()}]].|
690690 end
691691
692692 test "callback" , c do
@@ -724,7 +724,7 @@ defmodule ExDoc.Language.ErlangTest do
724724 ~S" -spec foo() -> #{atom() := sets:set(integer()), float() => t()}." ,
725725 c
726726 ) ==
727- ~S| foo() -> #{<a href="https://www.erlang.org/doc/man/erlang.html#type- atom">atom</a>() := <a href="https://www.erlang.org/doc/man/sets.html#type- set">sets:set</a>(<a href="https://www.erlang.org/doc/man/erlang.html#type- integer">integer</a>()), <a href="https://www.erlang.org/doc/man/erlang.html#type- float">float</a>() => <a href="#t:t/0">t</a>()}.|
727+ ~S| foo() -> #{<a href="https://www.erlang.org/doc/man/erlang.html#t: atom/0 ">atom</a>() := <a href="https://www.erlang.org/doc/man/sets.html#t: set/1 ">sets:set</a>(<a href="https://www.erlang.org/doc/man/erlang.html#t: integer/0 ">integer</a>()), <a href="https://www.erlang.org/doc/man/erlang.html#t: float/0 ">float</a>() => <a href="#t:t/0">t</a>()}.|
728728 end
729729
730730 test "vars" , c do
@@ -744,12 +744,12 @@ defmodule ExDoc.Language.ErlangTest do
744744
745745 test "record - one field" , c do
746746 assert autolink_spec ( ~s" -spec foo() -> #x{x :: atom()} | t()." , c ) ==
747- ~s[ foo() -> #x{x :: <a href="https://www.erlang.org/doc/man/erlang.html#type- atom">atom</a>()} | <a href="#t:t/0">t</a>().]
747+ ~s[ foo() -> #x{x :: <a href="https://www.erlang.org/doc/man/erlang.html#t: atom/0 ">atom</a>()} | <a href="#t:t/0">t</a>().]
748748 end
749749
750750 test "record - two fields" , c do
751751 assert autolink_spec ( ~s" -spec foo() -> #x{x :: atom(), y :: sets:set(integer())} | t()." , c ) ==
752- ~s[ foo() -> #x{x :: <a href="https://www.erlang.org/doc/man/erlang.html#type- atom">atom</a>(), y :: <a href="https://www.erlang.org/doc/man/sets.html#type- set">sets:set</a>(<a href="https://www.erlang.org/doc/man/erlang.html#type- integer">integer</a>())} | <a href="#t:t/0">t</a>().]
752+ ~s[ foo() -> #x{x :: <a href="https://www.erlang.org/doc/man/erlang.html#t: atom/0 ">atom</a>(), y :: <a href="https://www.erlang.org/doc/man/sets.html#t: set/1 ">sets:set</a>(<a href="https://www.erlang.org/doc/man/erlang.html#t: integer/0 ">integer</a>())} | <a href="#t:t/0">t</a>().]
753753 end
754754
755755 test "record - two fields, known types" , c do
@@ -789,12 +789,12 @@ defmodule ExDoc.Language.ErlangTest do
789789
790790 test "OTP type" , c do
791791 assert autolink_spec ( ~S" -spec foo() -> sets:set()." , c ) ==
792- ~s| foo() -> <a href="https://www.erlang.org/doc/man/sets.html#type- set">sets:set</a>().|
792+ ~s| foo() -> <a href="https://www.erlang.org/doc/man/sets.html#t: set/0 ">sets:set</a>().|
793793 end
794794
795795 test "OTP private type" , c do
796796 assert autolink_spec ( ~S" -spec foo() -> array:array_indx()." , c ) ==
797- ~s| foo() -> <a href="https://www.erlang.org/doc/man/array.html#type- array_indx">array:array_indx</a>().|
797+ ~s| foo() -> <a href="https://www.erlang.org/doc/man/array.html#t: array_indx/0 ">array:array_indx</a>().|
798798 end
799799
800800 test "skip typespec name" , c do
@@ -820,7 +820,7 @@ defmodule ExDoc.Language.ErlangTest do
820820 test "bad remote type" , c do
821821 assert warn ( fn ->
822822 assert autolink_spec ( ~S" -spec foo() -> bad:bad(atom())." , c , warnings: :send ) ==
823- ~s| foo() -> bad:bad(<a href="https://www.erlang.org/doc/man/erlang.html#type- atom">atom</a>()).|
823+ ~s| foo() -> bad:bad(<a href="https://www.erlang.org/doc/man/erlang.html#t: atom/0 ">atom</a>()).|
824824 end ) =~ ~s| references type "bad:bad/1" but it is undefined or private|
825825 end
826826 end
0 commit comments