Skip to content

Commit 3351bb3

Browse files
committed
stdlib: Fix shell_doc_SUITE:update_render failure on columns/1
Add spec to make shell_doc_SUITE:update_render happy. And cuddle shell_doc_SUITE:columns to still pass: The "-spec" line is not wrapped at 'shell_docs_column' (right or wrong?). So don't use columns values shorter than its length (30).
1 parent 5c568d5 commit 3351bb3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/stdlib/test/shell_docs_SUITE.erl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ ansi(_Config) ->
616616
-doc """
617617
Doc doc doc doc doc doc doc doc doc doc doc doc doc doc doc.
618618
""".
619+
-spec columns(list()) -> ok.
619620
columns(_Config) ->
620621
{ok, Docs} = code:get_doc(?MODULE),
621622

@@ -627,9 +628,9 @@ columns(_Config) ->
627628
lists:max(lists:map(fun string:length/1, Lines))
628629
end,
629630

630-
application:set_env(stdlib, shell_docs_columns, 30),
631-
?assert(MaxColumns(#{}) =< 30),
632-
?assert(MaxColumns(#{columns => 20}) =< 20),
631+
application:set_env(stdlib, shell_docs_columns, 40),
632+
?assert(MaxColumns(#{}) =< 40),
633+
?assert(MaxColumns(#{columns => 30}) =< 30),
633634

634635
application:set_env(stdlib, shell_docs_columns, not_an_integer),
635636
?assert(MaxColumns(#{}) > 30),
@@ -642,7 +643,7 @@ columns(_Config) ->
642643

643644
application:unset_env(stdlib, shell_docs_columns),
644645
?assert(MaxColumns(#{}) > 30),
645-
?assert(MaxColumns(#{columns => 20}) =< 20),
646+
?assert(MaxColumns(#{columns => 30}) =< 30),
646647

647648
ok.
648649

0 commit comments

Comments
 (0)