git @ Cat's Eye Technologies Falderal / 22a83ad
Update spec and HISTORY. Chris Pressey 1 year, 9 months ago
2 changed file(s) with 19 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
99 * In "freestyle" format, lines beginning with `<= `, `<== `, or
1010 `<=== ` can supply a section of test input text (Thanks to
1111 James Holderness for feature suggestion and patch.)
12 * Falderal is now responsible for quoting all shell metacharacters
13 in the substituion text of `%(...)` variables when command line
14 templates are expanded, so that no quotes need be placed around
15 the variable in the template. (Again, thanks to James Holderness
16 for spotting the bug in the code that led to this improvement.)
1217 * `py-falderal` can now run under both Python 2 and Python 3
1318 (tested with 2.7, 3.4, and 3.5.)
1419 * The doctests that were previously distributed throughout the
161161 text of the test and produces its output, to be compared with the expected
162162 output.
163163
164 When a variable is expanded, it is Falderal's responsibility to escape any
165 shell metacharacters that occur as part of the substitution text so that
166 it appears to the shell as a single token, and cannot otherwise affect the
167 meaning of the instantiated shell command. It is not necessary for a
168 variable to be enclosed in any kind of quotes in the command line template.
169 It is also not possible for the substitution text to e.g. expand to two
170 arguments, or to form a pipe or redirection specifier, etc.
171
172 The exact method by which the Falderal implementation escapes or quotes
173 the substitution text so that it appears unambiguously as a single argument
174 is left up to the implementation.
175
164176 ##### `%(test-body-file)` #####
165177
166178 The variable `%(test-body-file)` will be replaced by the name of a file which
170182 ##### `%(test-body-text)` #####
171183
172184 The variable `%(test-body-text)` will be replaced by the actual text of the
173 test body. It is assumed that `%(test-body-text)` will appear inside single
174 quotes in the command string, so any single quotes in the text of the test will
175 be escaped by the Falderal implementation by preceding them with backslashes.
185 test body.
176186
177187 ##### `%(test-input-file)` #####
178188
183193 ##### `%(test-input-text)` #####
184194
185195 The variable `%(test-input-text)` will be replaced by the actual text of the
186 test input. It is assumed that `%(test-input-text)` will appear inside single
187 quotes in the command string, so any single quotes in the text of the test will
188 be escaped by the Falderal implementation by preceding them with backslashes.
196 test input.
189197
190198 If neither of the variables `%(test-body-file)` nor `%(test-body-text)` appear
191199 in the command string, the test body text will be provided on the standard