Skip to content

Commit 1f0272f

Browse files
committed
Rename extra-args to extra-arg since it only adds 1 argument.
This is a backwards incompatible change, but it makes it much clearer that no string processing is happening.
1 parent d014d43 commit 1f0272f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ Each test command must define at least one sub-test:
143143
Test commands can alter the general command by specifying zero or more of the
144144
following:
145145

146-
* `extra-args: <string>` specifies a string which will be passed as an
146+
* `extra-arg: <string>` specifies a string which will be passed as an
147147
additional command-line argument to the command (in addition to those
148-
specified by the `test_cmds` function). Multiple `extra-args` can be
148+
specified by the `test_cmds` function). Multiple `extra-arg`s can be
149149
specified, each adding an additional command-line argument.
150150
* `stdin: <string>`, text to be passed to the command's `stdin`. If the
151151
command exits without having consumed all of `<string>`, an error will be

examples/rust_lang_tester/lang_tests/custom_cla.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Run-time:
2-
// extra-args: 1
3-
// extra-args: 2 3
2+
// extra-arg: 1
3+
// extra-arg: 2 3
44

55
use std::env;
66

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@
140140
//!
141141
//! Test commands can alter the general command by specifying zero or more of the following:
142142
//!
143-
//! * `extra-args: <string>` specifies a string which will be passed as an additional
143+
//! * `extra-arg: <string>` specifies a string which will be passed as an additional
144144
//! command-line argument to the command (in addition to those specified by the `test_cmds`
145-
//! function). Multiple `extra-args` can be specified, each adding an additional command-line
146-
//! argument.
145+
//! function). `extra-arg` can be specified multiple times, each adding an additional
146+
//! command-line argument.
147147
//! * stdin: <string>`, text to be passed to the command's `stdin`. If the command exits without
148148
//! having consumed all of `<string>`, an error will be raised. Note, though, that operating
149149
//! system file buffers can mean that the command *appears* to have consumed all of `<string>`

src/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) fn parse_tests(test_str: &str) -> Tests {
4949
let (end_line_off, key, val) = key_multiline_val(&lines, line_off, sub_indent);
5050
line_off = end_line_off;
5151
match key {
52-
"extra-args" => {
52+
"extra-arg" => {
5353
let val_str = val.join("\n");
5454
testcmd.args.push(val_str);
5555
}

0 commit comments

Comments
 (0)