Skip to content

Commit f1c8673

Browse files
committed
Fix issues with git converting CRLF to CR
UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets
1 parent 42a317a commit f1c8673

16 files changed

+63
-49
lines changed

src/test/ui/.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
trailing-carriage-return-in-string.rs -text
1+
lexer-crlf-line-endings-string-literal-doc-comment.rs -text
2+
trailing-carriage-return-in-string.rs -text

src/test/ui/error-codes/E0661.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-emscripten
2+
13
#![feature(asm)]
24

35
fn main() {

src/test/ui/error-codes/E0661.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0661]: output operand constraint lacks '=' or '+'
2-
--> $DIR/E0661.rs:5:18
2+
--> $DIR/E0661.rs:7:18
33
|
44
LL | asm!("nop" : "r"(a));
55
| ^^^

src/test/ui/error-codes/E0662.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-emscripten
2+
13
#![feature(asm)]
24

35
fn main() {

src/test/ui/error-codes/E0662.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0662]: input operand constraint contains '='
2-
--> $DIR/E0662.rs:6:12
2+
--> $DIR/E0662.rs:8:12
33
|
44
LL | : "=test"("a")
55
| ^^^^^^^

src/test/ui/error-codes/E0663.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-emscripten
2+
13
#![feature(asm)]
24

35
fn main() {

src/test/ui/error-codes/E0663.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0663]: input operand constraint contains '+'
2-
--> $DIR/E0663.rs:6:12
2+
--> $DIR/E0663.rs:8:12
33
|
44
LL | : "+test"("a")
55
| ^^^^^^^

src/test/ui/error-codes/E0664.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-emscripten
2+
13
#![feature(asm)]
24

35
fn main() {

src/test/ui/error-codes/E0664.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0664]: clobber should not be surrounded by braces
2-
--> $DIR/E0664.rs:7:12
2+
--> $DIR/E0664.rs:9:12
33
|
44
LL | : "{eax}"
55
| ^^^^^^^

src/test/ui/feature-gates/feature-gate-asm.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-emscripten
2+
13
fn main() {
24
unsafe {
35
asm!(""); //~ ERROR inline assembly is not stable enough

src/test/ui/feature-gates/feature-gate-asm.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
2-
--> $DIR/feature-gate-asm.rs:3:9
2+
--> $DIR/feature-gate-asm.rs:5:9
33
|
44
LL | asm!("");
55
| ^^^

src/test/ui/feature-gates/feature-gate-asm2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// gate-test-asm
2+
// ignore-emscripten
23

34
fn main() {
45
unsafe {

src/test/ui/feature-gates/feature-gate-asm2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
2-
--> $DIR/feature-gate-asm2.rs:5:26
2+
--> $DIR/feature-gate-asm2.rs:6:26
33
|
44
LL | println!("{:?}", asm!(""));
55
| ^^^

src/test/ui/issues/issue-53787-inline-assembler-macro.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Regression test for Issue #53787: Fix ICE when creating a label in inline assembler with macros.
22

3+
// ignore-emscripten
4+
35
#![feature(asm)]
46

57
macro_rules! fake_jump {

src/test/ui/issues/issue-53787-inline-assembler-macro.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0669]: invalid value for constraint in inline assembly
2-
--> $DIR/issue-53787-inline-assembler-macro.rs:21:16
2+
--> $DIR/issue-53787-inline-assembler-macro.rs:23:16
33
|
44
LL | fake_jump!("FirstFunc");
55
| ^^^^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
// run-pass
2-
// ignore-tidy-cr ignore-license
3-
// ignore-tidy-cr (repeated again because of tidy bug)
4-
// license is ignored because tidy can't handle the CRLF here properly.
5-
6-
// http://rust-lang.org/COPYRIGHT.
7-
//
8-
9-
// N.B., this file needs CRLF line endings. The .gitattributes file in
10-
// this directory should enforce it.
11-
12-
// ignore-pretty issue #37195
13-
14-
/// Doc comment that ends in CRLF
15-
pub fn foo() {}
16-
17-
/** Block doc comment that
18-
* contains CRLF characters
19-
*/
20-
pub fn bar() {}
21-
22-
fn main() {
23-
let s = "string
24-
literal";
25-
assert_eq!(s, "string\nliteral");
26-
27-
let s = "literal with \
28-
escaped newline";
29-
assert_eq!(s, "literal with escaped newline");
30-
31-
let s = r"string
32-
literal";
33-
assert_eq!(s, "string\nliteral");
34-
let s = br"byte string
35-
literal";
36-
assert_eq!(s, "byte string\nliteral".as_bytes());
37-
38-
// validate that our source file has CRLF endings
39-
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");
40-
assert!(source.contains("string\r\nliteral"));
41-
}
1+
// run-pass
2+
// ignore-tidy-cr ignore-license
3+
// ignore-tidy-cr (repeated again because of tidy bug)
4+
// license is ignored because tidy can't handle the CRLF here properly.
5+
6+
// http://rust-lang.org/COPYRIGHT.
7+
//
8+
9+
// N.B., this file needs CRLF line endings. The .gitattributes file in
10+
// this directory should enforce it.
11+
12+
// ignore-pretty issue #37195
13+
14+
/// Doc comment that ends in CRLF
15+
pub fn foo() {}
16+
17+
/** Block doc comment that
18+
* contains CRLF characters
19+
*/
20+
pub fn bar() {}
21+
22+
fn main() {
23+
let s = "string
24+
literal";
25+
assert_eq!(s, "string\nliteral");
26+
27+
let s = "literal with \
28+
escaped newline";
29+
assert_eq!(s, "literal with escaped newline");
30+
31+
let s = r"string
32+
literal";
33+
assert_eq!(s, "string\nliteral");
34+
let s = br"byte string
35+
literal";
36+
assert_eq!(s, "byte string\nliteral".as_bytes());
37+
38+
// validate that our source file has CRLF endings
39+
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");
40+
assert!(source.contains("string\r\nliteral"));
41+
}

0 commit comments

Comments
 (0)