@@ -5,9 +5,13 @@ This project contains a collection of scripts and autotest
5
5
(part of [ autoconf] ( https://www.gnu.org/software/autoconf/ ) )
6
6
macros:
7
7
8
- * [ pyrediff] ( #pyrediff )
9
- * [ check\_ pattern.awk] ( #check_patternawk )
10
- * [ autotest macros] ( #autotest-macros )
8
+ * [ ` pyrediff ` ] ( #pyrediff )
9
+ * [ ` check_pattern.awk ` ] ( #check_patternawk )
10
+ * [ autotest m4 macros] ( #autotest-macros ) , including:
11
+ * [ ` AX_AT_CHECK_PATTERN() ` ] ( #macro-ax_at_check_patterncommands-status0-stdout-re-stderr-re-run-if-fail-run-if-pass )
12
+ * [ ` AX_AT_DIFF_PATTERN() ` ] ( #macro-ax_at_diff_patternpattern-file-test-file-status0-differences-run-if-fail-run-if-pass )
13
+ * [ ` AX_AT_CHECK_PYREDIFF() ` ] ( #macro-ax_at_check_pyrediffcommands-status0-stdout-re-stderr-re-run-if-fail-run-if-pass )
14
+ * [ ` AX_AT_DIFF_PYRE() ` ] ( #macro-ax_at_diff_pyrepyre-file-test-file-status0-differences-run-if-fail-run-if-pass )
11
15
12
16
## pyrediff
13
17
@@ -58,33 +62,64 @@ The script is usually invoked as:
58
62
59
63
Various autotest
60
64
([ autoconf] ( https://www.gnu.org/software/autoconf/ ) )
61
- macros are provided with pattern (AWK regular expression)
65
+ m4 macros are provided with pattern (AWK regular expression)
62
66
and pyre (Python regular expression) support.
63
67
68
+ > ** Note** : As autoconf uses [ ] for quoting, the use of [ brackets] in the
69
+ > macro arguments _ stdout-re_ and _ stderr-re_ can be awkward and require
70
+ > careful extra quoting, or quadrigraphs ` @<:@ ` (for ` [ ` ) and ` @:>@ ` (for ` ] ` ).
71
+
64
72
### AWK regular expression patterns
65
73
66
74
Macros that support AWK regular expressions in the pattern:
67
75
68
- * ` AX_AT_CHECK_PATTERN() ` : similar to ` AT_CHECK() ` ,
69
- except that stdout and stderr are AWK regular expressions (REs).
70
- * ` AX_AT_DIFF_PATTERN() ` : checks that a pattern file applies to
71
- a test file.
72
- * ` AX_AT_DATA_CHECK_PATTERN_AWK() ` : create a file with the
73
- contents of the AWK script used by ` AX_AT_CHECK_PATTERN() `
74
- and ` AX_AT_DIFF_PATTERN() ` .
75
- This is the same as the [ check\_ pattern.awk] ( #check_patternawk ) script.
76
+ #### Macro: ` AX_AT_CHECK_PATTERN( ` _ commands_ , [ _ status_ =0] , [ _ stdout-re_ ] , [ _ stderr-re_ ] , [ _ run-if-fail_ ] , [ _ run-if-pass_ ] ` ) `
77
+
78
+ Similar to ` AT_CHECK() ` , except that _ stdout-re_ and _ stderr-re_ are
79
+ AWK regular expressions (REs).
80
+
81
+ Using ` AT_CHECK() ` , runs _ commands_ in a subshell, which are expected to
82
+ have an exit status of _ status_ , and to generate ` stdout ` to match the
83
+ pattern _ stdout-re_ and ` stderr ` to match the pattern _ stderr-re_ .
84
+ The ` AT_CHECK() ` support for special values for _ stdout-re_ and _ stderr-re_
85
+ of ` ignore ` , ` stdout ` , ` stderr ` , (etc) is available.
86
+
87
+ #### Macro: ` AX_AT_DIFF_PATTERN( ` _ pattern-file_ , _ test-file_ , [ _ status_ =0] , [ _ differences_ ] , [ _ run-if-fail_ ] , [ _ run-if-pass_ ] ` ) `
88
+
89
+ Checks that an AWK pattern file ` PATTERN-FILE ` applies to a test file ` TEST-FILE ` ,
90
+ using ` AT_CHECK() ` .
91
+
92
+ #### Macro: ` AX_AT_DATA_CHECK_PATTERN_AWK( ` _ filename_ ` ) `
93
+
94
+ Create the file _ filename_ with the contents of the AWK script used by
95
+ ` AX_AT_CHECK_PATTERN() ` and ` AX_AT_DIFF_PATTERN() ` .
96
+ This is the same as the [ check\_ pattern.awk] ( #check_patternawk ) script.
76
97
77
98
### Python regular expression (pyre) patterns
78
99
79
100
Macros that support
80
101
[ Python regular expressions] ( https://docs.python.org/3/library/re.html ) :
81
102
82
- * ` AX_AT_CHECK_PYREDIFF() ` : similar to ` AT_CHECK() ` ,
83
- except that stdout and stderr are Python regular expressions (pyre).
84
- * ` AX_AT_DIFF_PYRE() ` : checks that a pattern file applies to a test file.
85
- * ` AX_AT_DATA_PYREDIFF_PY() ` : create a file with the contents of the
86
- Python script used by ` AX_AT_CHECK_PYREDIFF() ` and ` AX_AT_DIFF_PYRE() ` .
87
- This is the same as the [ pyrediff] ( #pyrediff ) script.
103
+ #### Macro: ` AX_AT_CHECK_PYREDIFF( ` _ commands_ , [ _ status_ =0] , [ _ stdout-re_ ] , [ _ stderr-re_ ] , [ _ run-if-fail_ ] , [ _ run-if-pass_ ] ` ) `
104
+
105
+ Similar to ` AT_CHECK() ` , except that _ stdout-re_ and _ stderr-re_ are
106
+ Python regular expressions (pyre).
107
+
108
+ Using ` AT_CHECK() ` , runs _ commands_ in a subshell, which are expected to
109
+ have an exit status of _ status_ , and to generate ` stdout ` to match the
110
+ pyre (Python regular expression) _ stdout-re_ and ` stderr ` to match the pyre _ stderr-re_ .
111
+ The ` AT_CHECK() ` support for special values for _ stdout-re_ and _ stderr-re_
112
+ of ` ignore ` , ` stdout ` , ` stderr ` , (etc) is available.
113
+
114
+ #### Macro: ` AX_AT_DIFF_PYRE( ` _ pyre-file_ , _ test-file_ , [ _ status_ =0] , [ _ differences_ ] , [ _ run-if-fail_ ] , [ _ run-if-pass_ ] )`
115
+
116
+ Checks that a pyre file _ pyre-file_ applies to a test file _ test-file_ .
117
+
118
+ #### Macro: ` AX_AT_DATA_PYREDIFF_PY( ` _ filename_ ` ) `
119
+
120
+ Create a file _ filename_ with the contents of the Python script used by
121
+ ` AX_AT_CHECK_PYREDIFF() ` and ` AX_AT_DIFF_PYRE() ` .
122
+ This is the same as the [ pyrediff] ( #pyrediff ) script.
88
123
89
124
## Examples
90
125
0 commit comments