Fix terminal dependent tests
This commit is contained in:
parent
158ae9ee50
commit
8a573580f8
8 changed files with 16 additions and 12 deletions
|
|
@ -139,6 +139,10 @@ prefixing each source line are replaced with `LL`). In extremely rare
|
|||
situations, this mode can be disabled with the directive `//@
|
||||
compile-flags: -Z ui-testing=no`.
|
||||
|
||||
When using `-Z ui-testing=no` the `--diagnostic-width` argument should also
|
||||
be set to avoid tests failing or passing depending on the width of the terminal
|
||||
from which the UI test suite is being run.
|
||||
|
||||
Note: The line and column numbers for `-->` lines pointing to the test are *not*
|
||||
normalized, and left as-is. This ensures that the compiler continues to point to
|
||||
the correct location, and keeps the stderr files readable. Ideally all
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -Z ui-testing=no
|
||||
//@ compile-flags: -Z ui-testing=no --diagnostic-width=80
|
||||
|
||||
// Line number < 10
|
||||
type A = B; //~ ERROR
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Check what happens when the error occurs inside a std function that we can't print the span of.
|
||||
//@ ignore-backends: gcc
|
||||
//@ compile-flags: -Z ui-testing=no
|
||||
//@ compile-flags: -Z ui-testing=no --diagnostic-width=80
|
||||
|
||||
use std::{
|
||||
mem::{self, MaybeUninit},
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
error[E0080]: memory access failed: attempting to access 1 byte, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
|
||||
--> $DIR/missing_span_in_backtrace.rs:16:9
|
||||
|
|
||||
16 | / ptr::swap_nonoverlapping(
|
||||
17 | | &mut x1 as *mut _ as *mut MaybeUninit<u8>,
|
||||
18 | | &mut x2 as *mut _ as *mut MaybeUninit<u8>,
|
||||
19 | | 10,
|
||||
20 | | );
|
||||
| |_________^ evaluation of `X` failed inside this call
|
||||
16 | / ... ptr::swap_nonoverlapping(
|
||||
17 | | ... &mut x1 as *mut _ as *mut MaybeUninit<u8>,
|
||||
18 | | ... &mut x2 as *mut _ as *mut MaybeUninit<u8>,
|
||||
19 | | ... 10,
|
||||
20 | | ... );
|
||||
| |_______^ evaluation of `X` failed inside this call
|
||||
|
|
||||
note: inside `swap_nonoverlapping::compiletime::<MaybeUninit<u8>>`
|
||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -Z ui-testing=no
|
||||
//@ compile-flags: -Z ui-testing=no --diagnostic-width=80
|
||||
fn function_with_lots_of_arguments(a: i32, b: char, c: i32, d: i32, e: i32, f: i32) {}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ error[E0061]: this function takes 6 arguments but 5 arguments were supplied
|
|||
note: function defined here
|
||||
--> $DIR/trimmed_multiline_suggestion.rs:2:4
|
||||
|
|
||||
2 | fn function_with_lots_of_arguments(a: i32, b: char, c: i32, d: i32, e: i32, f: i32) {}
|
||||
2 | fn function_with_lots_of_arguments(a: i32, b: char, c: i32, d: i32, e: i3...
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------
|
||||
help: provide the argument
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -Z ui-testing=no
|
||||
//@ compile-flags: -Z ui-testing=no --diagnostic-width=80
|
||||
#[path = "auxiliary/dummy_lib.rs"]
|
||||
mod lib;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -Z ui-testing=no
|
||||
//@ compile-flags: -Z ui-testing=no --diagnostic-width=80
|
||||
|
||||
struct MyError;
|
||||
impl std::error::Error for MyError {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue