diff options
| author | beetrees <b@beetr.ee> | 2023-05-15 18:34:32 +0000 |
|---|---|---|
| committer | beetrees <b@beetr.ee> | 2024-03-07 00:19:55 +0000 |
| commit | 63091b105d08b7b0db19d699d3be3060acde04ad (patch) | |
| tree | 82ededcd7e6022139b1570cd3cbed16493c57a07 /tests/rustdoc-ui/argfile | |
| parent | 7d3702e472b99be0f5de6608dd87af1df8f99428 (diff) | |
| download | rust-63091b105d08b7b0db19d699d3be3060acde04ad.tar.gz rust-63091b105d08b7b0db19d699d3be3060acde04ad.zip | |
Make `arg_expand_all` not short-circuit on first error
Diffstat (limited to 'tests/rustdoc-ui/argfile')
15 files changed, 152 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.rs b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.rs new file mode 100644 index 00000000000..eba17ca6f7e --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.rs @@ -0,0 +1,17 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. This test uses backslash as the path separator for the command +// line arguments and is only run on windows. +// +//@ only-windows +//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-badutf8.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.stderr new file mode 100644 index 00000000000..b4c0d4c20d7 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.stderr @@ -0,0 +1,2 @@ +error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args new file mode 100644 index 00000000000..c070b0c2400 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args @@ -0,0 +1,2 @@ +--cfg +unbroken€ \ No newline at end of file diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.rs b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.rs new file mode 100644 index 00000000000..1b2e52af762 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.rs @@ -0,0 +1,18 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. We have a duplicated version of this test that uses backslash as +// the path separator for the command line arguments that is only run on +// windows. +// +//@ ignore-windows +//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-badutf8.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.stderr new file mode 100644 index 00000000000..b4c0d4c20d7 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.stderr @@ -0,0 +1,2 @@ +error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs new file mode 100644 index 00000000000..24cfd25ccad --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs @@ -0,0 +1,19 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. This test uses backslash as the path separator for the command +// line arguments and is only run on windows. +// +//@ only-windows +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.stderr new file mode 100644 index 00000000000..28a20debf1c --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.stderr @@ -0,0 +1,2 @@ +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs b/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs new file mode 100644 index 00000000000..fe6a849b0c8 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs @@ -0,0 +1,20 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. We have a duplicated version of this test that uses backslash as +// the path separator for the command line arguments that is only run on +// windows. +// +//@ ignore-windows +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-missing.stderr new file mode 100644 index 00000000000..28a20debf1c --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing.stderr @@ -0,0 +1,2 @@ +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs new file mode 100644 index 00000000000..84c050d84e2 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs @@ -0,0 +1,20 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. This test uses backslash as the path separator for the command +// line arguments and is only run on windows. +// +//@ only-windows +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.stderr new file mode 100644 index 00000000000..ad3b445c958 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.stderr @@ -0,0 +1,6 @@ +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) + +error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args + +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing2.args: $FILE_MISSING (os error $ERR) + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs new file mode 100644 index 00000000000..f658ee34fbb --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs @@ -0,0 +1,21 @@ +// Check to see if we can get parameters from an @argsfile file +// +// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path +// separators. We have a duplicated version of this test that uses backslash as +// the path separator for the command line arguments that is only run on +// windows. +// +//@ ignore-windows +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple.stderr b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.stderr new file mode 100644 index 00000000000..ad3b445c958 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.stderr @@ -0,0 +1,6 @@ +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) + +error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args + +error: failed to load argument file: IO error: $DIR/commandline-argfile-missing2.args: $FILE_MISSING (os error $ERR) + diff --git a/tests/rustdoc-ui/argfile/commandline-argfile.args b/tests/rustdoc-ui/argfile/commandline-argfile.args new file mode 100644 index 00000000000..972938bf6c8 --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile.args @@ -0,0 +1,2 @@ +--cfg +unbroken \ No newline at end of file diff --git a/tests/rustdoc-ui/argfile/commandline-argfile.rs b/tests/rustdoc-ui/argfile/commandline-argfile.rs new file mode 100644 index 00000000000..b0b314f53ce --- /dev/null +++ b/tests/rustdoc-ui/argfile/commandline-argfile.rs @@ -0,0 +1,13 @@ +// Check to see if we can get parameters from an @argsfile file +// +//@ check-pass +//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} |
