aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-30 18:51:53 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-01 00:55:09 +0100
commit74ba40fadc42f7b3b2222cc231d2c38959943643 (patch)
treefe6c4a3bfc2767c779002cf62a412ebb634afa49 /Documentation
parent49c98aa3ed1b315ed2f4fbe44271ecd5bdd9cbc7 (diff)
downloadsparse-dev-74ba40fadc42f7b3b2222cc231d2c38959943643.tar.gz
testsuite: add a new tag: check-output-match
The current tags check-output-contains/excludes/pattern are quite powerful, universal, but they often need 'complex' regular expressions with escaping which make them not so nice to read. For testing IR results, a very common pattern is: this instruction must have this (kind of) operand. So, make a new tag for this. It does nothing than can't be done with done with the previous ones, on the contrary, but is much simpler to use: check-output-match(instruction): operand Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/test-suite.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/test-suite.rst b/Documentation/test-suite.rst
index 333106ee..4ff2db2f 100644
--- a/Documentation/test-suite.rst
+++ b/Documentation/test-suite.rst
@@ -88,6 +88,14 @@ Tag's syntax
of the number of times the pattern should occur in the output.
If *min* or *max* is ``-`` the corresponding check is ignored.
+``check-output-match(``\ *start*\ ``):`` *pattern*
+
+ Check that in the output (stdout) all lines starting with the
+ first pattern also contains the second pattern. This should be
+ reserved for matching IR instructions since the '.$size' suffix
+ is ignored in the first pattern but is expected to be followed
+ by a space character.
+
Using test-suite
================