]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #54813 - petrochenkov:uilocale, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 7 Oct 2018 11:10:39 +0000 (11:10 +0000)
committerbors <bors@rust-lang.org>
Sun, 7 Oct 2018 11:10:39 +0000 (11:10 +0000)
Fix two UI tests with locale-dependent output

Closes https://github.com/rust-lang/rust/issues/54719

src/test/ui/extern/external-doc-error.rs
src/test/ui/extern/external-doc-error.stderr
src/test/ui/macros/macros-nonfatal-errors.rs
src/test/ui/macros/macros-nonfatal-errors.stderr

index 2cd17804e06caa100d73e62f85dcbb22434df408..5c6f6e49b3d77f9bcec8d825ca8206ea434e8bff 100644 (file)
@@ -1,15 +1,4 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
-// ignore-tidy-linelength
+// normalize-stderr-test: "not-a-file.md:.*\(" -> "not-a-file.md: $$FILE_NOT_FOUND_MSG ("
 
 #![feature(external_doc)]
 
index 98ade5de7f3a753fbec23ec74f34a51a471d4645..5cc7551ee03aa253732711a91bae481c4f956c99 100644 (file)
@@ -1,5 +1,5 @@
-error: couldn't read $DIR/not-a-file.md: No such file or directory (os error 2)
-  --> $DIR/external-doc-error.rs:16:1
+error: couldn't read $DIR/not-a-file.md: $FILE_NOT_FOUND_MSG (os error 2)
+  --> $DIR/external-doc-error.rs:5:1
    |
 LL | #[doc(include = "not-a-file.md")] //~ ERROR: couldn't read
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index ce2dfb906c5ce3cf648b728576c023a37a7f18cc..1eb82a20729ca8b60bfffdc7fa14ea1a98fa3a8a 100644 (file)
@@ -1,15 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
-// ignore-tidy-linelength
+// normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG ("
 
 // test that errors in a (selection) of macros don't kill compilation
 // immediately, so that we get more errors listed at a time.
index 81e250d5ea09e43ee780b4593039ba7f6ccbb514..ce7035ee2746130b8b390dda956193a615cb853a 100644 (file)
@@ -1,47 +1,47 @@
 error[E0665]: `Default` cannot be derived for enums, only structs
-  --> $DIR/macros-nonfatal-errors.rs:20:10
+  --> $DIR/macros-nonfatal-errors.rs:9:10
    |
 LL | #[derive(Default)] //~ ERROR
    |          ^^^^^^^
 
 error: inline assembly must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:24:10
+  --> $DIR/macros-nonfatal-errors.rs:13:10
    |
 LL |     asm!(invalid); //~ ERROR
    |          ^^^^^^^
 
 error: concat_idents! requires ident args.
-  --> $DIR/macros-nonfatal-errors.rs:26:5
+  --> $DIR/macros-nonfatal-errors.rs:15:5
    |
 LL |     concat_idents!("not", "idents"); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:28:17
+  --> $DIR/macros-nonfatal-errors.rs:17:17
    |
 LL |     option_env!(invalid); //~ ERROR
    |                 ^^^^^^^
 
 error: expected string literal
-  --> $DIR/macros-nonfatal-errors.rs:29:10
+  --> $DIR/macros-nonfatal-errors.rs:18:10
    |
 LL |     env!(invalid); //~ ERROR
    |          ^^^^^^^
 
 error: expected string literal
-  --> $DIR/macros-nonfatal-errors.rs:30:10
+  --> $DIR/macros-nonfatal-errors.rs:19:10
    |
 LL |     env!(foo, abr, baz); //~ ERROR
    |          ^^^
 
 error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined
-  --> $DIR/macros-nonfatal-errors.rs:31:5
+  --> $DIR/macros-nonfatal-errors.rs:20:5
    |
 LL |     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: format argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:33:13
+  --> $DIR/macros-nonfatal-errors.rs:22:13
    |
 LL |     format!(invalid); //~ ERROR
    |             ^^^^^^^
@@ -51,37 +51,37 @@ LL |     format!("{}", invalid); //~ ERROR
    |             ^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:35:14
+  --> $DIR/macros-nonfatal-errors.rs:24:14
    |
 LL |     include!(invalid); //~ ERROR
    |              ^^^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:37:18
+  --> $DIR/macros-nonfatal-errors.rs:26:18
    |
 LL |     include_str!(invalid); //~ ERROR
    |                  ^^^^^^^
 
-error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
-  --> $DIR/macros-nonfatal-errors.rs:38:5
+error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+  --> $DIR/macros-nonfatal-errors.rs:27:5
    |
 LL |     include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:39:20
+  --> $DIR/macros-nonfatal-errors.rs:28:20
    |
 LL |     include_bytes!(invalid); //~ ERROR
    |                    ^^^^^^^
 
-error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
-  --> $DIR/macros-nonfatal-errors.rs:40:5
+error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+  --> $DIR/macros-nonfatal-errors.rs:29:5
    |
 LL |     include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: trace_macros! accepts only `true` or `false`
-  --> $DIR/macros-nonfatal-errors.rs:42:5
+  --> $DIR/macros-nonfatal-errors.rs:31:5
    |
 LL |     trace_macros!(invalid); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^