// ignore-tidy-cr ignore-license\r
// ignore-tidy-cr (repeated again because of tidy bug)\r
// license is ignored because tidy can't handle the CRLF here properly.\r
-
+\r
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r
// file at the top-level directory of this distribution and at\r
// http://rust-lang.org/COPYRIGHT.\r
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\r
// option. This file may not be copied, modified, or distributed\r
// except according to those terms.\r
-
+\r
// NB: this file needs CRLF line endings. The .gitattributes file in\r
// this directory should enforce it.\r
-
+\r
// ignore-pretty\r
-
+\r
/// Doc comment that ends in CRLF\r
pub fn foo() {}\r
-
+\r
/** Block doc comment that\r
* contains CRLF characters\r
*/\r
pub fn bar() {}\r
-
+\r
fn main() {\r
let s = "string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
-
+\r
let s = "literal with \\r
escaped newline";\r
assert_eq!(s, "literal with escaped newline");\r
-
+\r
let s = r"string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
-
+\r
// validate that our source file has CRLF endings\r
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");\r
assert!(source.contains("string\r\nliteral"));\r