Skip to content

ct_doctests is too lenient #10865

@bjorng

Description

@bjorng

In the Examples part of the documentation, prompt lines not ending in a period (.) would not be flagged as errors.

To Reproduce
Apply the following patch, rebuild, and run lists_SUITE:doctests/1:

diff --git a/lib/stdlib/src/lists.erl b/lib/stdlib/src/lists.erl
index 1b6f9043e2..1cfedd5933 100644
--- a/lib/stdlib/src/lists.erl
+++ b/lib/stdlib/src/lists.erl
@@ -107,7 +107,7 @@ Returns `Tuple` if such a tuple is found; otherwise, returns `false`.
 ## Examples
 
 ```erlang
-1> lists:keyfind(b, 1, [{a,10}, {b,20}, {c,30}]).
+1> lists:keyfind(b, 1, [{a,10}, {b,20}, {c,30}])
 {b,20}
 2> lists:keyfind(unknown, 1, [{a,10}, {b,20}, {c,30}]).
 false

Expected behavior
The test case should fail.

Affected versions
OTP 29 RC2

Additional context
See also #10844 that add missing periods to many lines. The test suite does not fail without that PR.

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions