[PATCH] tests: confirm that a badly documented extension doesn't cause a crash

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Feb 12 08:46:25 EST 2016



On 02/11/2016 02:43 PM, Simon Farnsworth wrote:
> # HG changeset patch
> # User Simon Farnsworth <simonfar at fb.com>
> # Date 1455201149 28800
> #      Thu Feb 11 06:32:29 2016 -0800
> # Node ID 1a53db18927270c9156aac0f712acc3b399b1ea5
> # Parent  ab0871393d3e0827645371b3d764c268c7ebde94
> tests: confirm that a badly documented extension doesn't cause a crash
>
> An external extension whose docstring doesn't conform to Mercurial standards
> used to cause crashes. Test that we omit such extensions when you do a
> keyword search.


Thanks for following up with a test case!

> diff --git a/tests/test-baddocs-extension.t b/tests/test-baddocs-extension.t
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-baddocs-extension.t
> @@ -0,0 +1,24 @@

However, adding a whole new file for such trivial thing is discouraged. 
Can you add it to an existing file?

Details on this policy here:

https://www.mercurial-scm.org/wiki/WritingTests#Be_careful_with_new_test_scripts.21

Also, please mention the issue number in your test "documentation" so 
that people can easily get more context on where this test is coming from.

Cheers

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list