diff --git a/doc/developer/advance.tex b/doc/developer/advance.tex index 9cdae7b648b7fe6ac7012808e09b58cb536a5c99..3917f576cf2a906a48c419899453a9d80f77f535 100644 --- a/doc/developer/advance.tex +++ b/doc/developer/advance.tex @@ -1168,18 +1168,20 @@ or the suite. This directive is only usable in a \texttt{test\_config}\codeidx{test\_config} configuration file. -\item The \texttt{FILTER}\nscodeidx{Test!Directive}{FILTER} command performs - a transformation on the test result files before the comparison from the +\item The \texttt{FILTER}\nscodeidx{Test!Directive}{FILTER} directive specifies + a transformation on the test result files before the comparison to the the oracles. - The filter command read the result from the standard input and the oracle - will be compared from the standard output of that command. - In such a command, the \texttt{@PTEST\_ORACLE@} variable is set to the + The filtering command read the result from the standard input and the oracle + will be compared with the standard output of that command. + In such a directive, the \texttt{@PTEST\_ORACLE@} variable is set to the basename of the oracle. That allows to perform a \texttt{diff} command with the oracle of another test configuration: \begin{code} FILTER: diff --new-file @PTEST_DIR@/oracle_configuration/@PTEST_ORACLE@ \end{code} + Chaining multiple filter commands is possible in defining several \texttt{FILTER} directives, + and an empty command drops the previous \texttt{FILTER} directives. \end{itemize} \begin{important} diff --git a/ptests/ptests.ml b/ptests/ptests.ml index 7831fc5c551767f472bafc9f92a208cf8d8b803b..b98589f11bc1df78bcb3c4425c22ce516dfbb46a 100644 --- a/ptests/ptests.ml +++ b/ptests/ptests.ml @@ -340,6 +340,8 @@ let example_msg = EXIT: <number> @[<v 0># Defines the exit code required for the next sub-test commands.@]@ \ FILTER: <cmd> @[<v 0># Performs a transformation on the test result files before the comparison from the oracles.@ \ # The oracle will be compared from the standard output of the command: cat <test-output-file> | <cmd> .@ \ + # Chaining multiple filter commands is possible in defining several FILTER directives.@ \ + # An empty command drops the previous FILTER directives.@ \ # Note: in such a command, the @@PTEST_ORACLE@@ variable is set to the basename of the oracle.@ \ # That allows to perform a 'diff' command with the oracle of another test configuration:@ \ # FILTER: diff --new-file @@PTEST_DIR@@/oracle_configuration/@@PTEST_ORACLE@@ @]@ \