]>
git.proxmox.com Git - rustc.git/blob - src/test/run-pass/lexer-crlf-line-endings-string-literal-doc-comment.rs
1 // ignore-tidy-cr ignore-license
2 // ignore-tidy-cr (repeated again because of tidy bug)
3 // license is ignored because tidy can't handle the CRLF here properly.
5 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
6 // file at the top-level directory of this distribution and at
7 // http://rust-lang.org/COPYRIGHT.
9 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
10 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
11 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
12 // option. This file may not be copied, modified, or distributed
13 // except according to those terms.
15 // NB: this file needs CRLF line endings. The .gitattributes file in
16 // this directory should enforce it.
20 /// Doc comment that ends in CRLF
23 /** Block doc comment that
24 * contains CRLF characters
31 assert_eq
!(s
, "string\nliteral");
33 let s
= "literal with \
35 assert_eq
!(s
, "literal with escaped newline");
39 assert_eq
!(s
, "string\nliteral");
41 // validate that our source file has CRLF endings
42 let source
= include_str
!("lexer-crlf-line-endings-string-literal-doc-comment.rs");
43 assert
!(source
.contains("string\r\nliteral"));