[PATCH 8 of 8 v2] tests: splitting test-gendoc.t into per file tests [RFC]

Matt Mackall mpm at selenic.com
Sat Jan 16 13:17:16 CST 2016


On Tue, 2016-01-12 at 01:09 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1452113150 0
> #      Wed Jan 06 20:45:50 2016 +0000
> # Node ID 660830fa0789ad40019f8d968132094db5c94832
> # Parent  457ce2835c3e3ac6a6be76bac77e125d8c2cb658
> tests: splitting test-gendoc.t into per file tests [RFC]
> 
> This makes test-gendoc-C.t a template, whenever it changes,
> test-gendoc.t will fail complaining about how the other
> tests need to be updated.

I like the general idea of this, but I think it should be structured thusly:

- move all the details of testing gendoc into a helper script
- make each language-specific test a trivial one command call and its output:

  $ TESTDIR/check-gendoc da
  checking for parse errors

  (without using hg cp)
- reduce the test-gendoc.t loop to checking there's a test for each language

This way, if we ever make changes to check-gendoc, we don't have to
remember to manually copy it to all the tests.

One benefit here worth mentioning is translators only need to run the test for
their language.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list