Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a better format error info #20

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

williamthome
Copy link
Owner

An example of a moduledoc error when the line sequence is wrong:

=ERROR REPORT==== 22-May-2024::23:27:42.877355 ===
Error in process <0.320.0> with exit value:
{{doctest,{moduledoc_format,#{line => 24,module => foo,
                              expected => <<"2> foo:foo()">>,
                              received => <<"3> foo:foo()">>}}},
 [{doctest_eunit,moduledoc_tests,
                 [foo,17,
                  [{<<"1> foo:foo()\n.. =:= bar.\nfalse\n3> foo:foo()\n.. =:=\n.. foo.\ntrue">>,
                    {4,1}}]],
                 [{file,"/home/williamthome/Projects/williamthome/doctest/src/doctest_eunit.erl"},
                  {line,70}]},
  {doctest_parse,module_tests,3,
                 [{file,"/home/williamthome/Projects/williamthome/doctest/src/doctest_parse.erl"},
                  {line,36}]},
  {doctest,module,2,
           [{file,"/home/williamthome/Projects/williamthome/doctest/src/doctest.erl"},
            {line,51}]},
  {doctest_test,module_test,0,
                [{file,"/home/williamthome/Projects/williamthome/doctest/test/doctest_test.erl"},
                 {line,21}]},
  {eunit_test,'-mf_wrapper/2-fun-0-',2,[{file,"eunit_test.erl"},{line,274}]},
  {eunit_test,run_testfun,1,[{file,"eunit_test.erl"},{line,72}]},
  {eunit_proc,run_test,1,[{file,"eunit_proc.erl"},{line,544}]},
  {eunit_proc,with_timeout,3,[{file,"eunit_proc.erl"},{line,369}]}]}

@williamthome williamthome merged commit eabbcac into main May 23, 2024
2 checks passed
@williamthome williamthome deleted the feat/improve-format-error branch May 23, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant