testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343)

* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Timothee Cour 2020-12-14 01:58:29 -08:00 • committed by GitHub
commit 7e1ae35195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 33 additions and 39 deletions

View file

@ -152,8 +152,11 @@ Example "template" **to edit** and write a Testament unittest:
# Timeout seconds to run the test. Fractional values are supported.
timeout: 1.5
# Targets to run the test into (C, C++, JavaScript, etc).
target: "c js"
# Targets to run the test into (c, cpp, objc, js).
targets: "c js"
# flags with which to run the test, delimited by `;`
matrix: "; -d:release; -d:caseFoo -d:release"
# Conditions that will skip this test. Use of multiple "disabled" clauses
# is permitted.
@ -221,7 +224,7 @@ JavaScript tests:
.. code-block:: nim
discard """
target: "js"
targets: "js"
"""
when defined(js):
import jsconsole