forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
42a317a
commit f1c8673
Showing
16 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
trailing-carriage-return-in-string.rs -text | ||
lexer-crlf-line-endings-string-literal-doc-comment.rs -text | ||
trailing-carriage-return-in-string.rs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// ignore-emscripten | ||
|
||
#![feature(asm)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// ignore-emscripten | ||
|
||
#![feature(asm)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// ignore-emscripten | ||
|
||
#![feature(asm)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// ignore-emscripten | ||
|
||
#![feature(asm)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// ignore-emscripten | ||
|
||
fn main() { | ||
unsafe { | ||
asm!(""); //~ ERROR inline assembly is not stable enough | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// gate-test-asm | ||
// ignore-emscripten | ||
|
||
fn main() { | ||
unsafe { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 41 additions & 41 deletions
82
src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
// run-pass | ||
// ignore-tidy-cr ignore-license | ||
// ignore-tidy-cr (repeated again because of tidy bug) | ||
// license is ignored because tidy can't handle the CRLF here properly. | ||
|
||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
|
||
// N.B., this file needs CRLF line endings. The .gitattributes file in | ||
// this directory should enforce it. | ||
|
||
// ignore-pretty issue #37195 | ||
|
||
/// Doc comment that ends in CRLF | ||
pub fn foo() {} | ||
|
||
/** Block doc comment that | ||
* contains CRLF characters | ||
*/ | ||
pub fn bar() {} | ||
|
||
fn main() { | ||
let s = "string | ||
literal"; | ||
assert_eq!(s, "string\nliteral"); | ||
|
||
let s = "literal with \ | ||
escaped newline"; | ||
assert_eq!(s, "literal with escaped newline"); | ||
|
||
let s = r"string | ||
literal"; | ||
assert_eq!(s, "string\nliteral"); | ||
let s = br"byte string | ||
literal"; | ||
assert_eq!(s, "byte string\nliteral".as_bytes()); | ||
|
||
// validate that our source file has CRLF endings | ||
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs"); | ||
assert!(source.contains("string\r\nliteral")); | ||
} | ||
// run-pass | ||
// ignore-tidy-cr ignore-license | ||
// ignore-tidy-cr (repeated again because of tidy bug) | ||
// license is ignored because tidy can't handle the CRLF here properly. | ||
|
||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
|
||
// N.B., this file needs CRLF line endings. The .gitattributes file in | ||
// this directory should enforce it. | ||
|
||
// ignore-pretty issue #37195 | ||
|
||
/// Doc comment that ends in CRLF | ||
pub fn foo() {} | ||
|
||
/** Block doc comment that | ||
* contains CRLF characters | ||
*/ | ||
pub fn bar() {} | ||
|
||
fn main() { | ||
let s = "string | ||
literal"; | ||
assert_eq!(s, "string\nliteral"); | ||
|
||
let s = "literal with \ | ||
escaped newline"; | ||
assert_eq!(s, "literal with escaped newline"); | ||
|
||
let s = r"string | ||
literal"; | ||
assert_eq!(s, "string\nliteral"); | ||
let s = br"byte string | ||
literal"; | ||
assert_eq!(s, "byte string\nliteral".as_bytes()); | ||
|
||
// validate that our source file has CRLF endings | ||
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs"); | ||
assert!(source.contains("string\r\nliteral")); | ||
} |