Merge pull request #3266 from wada314/fix-2973

Fix issue #3265
This commit is contained in:
Seiichi Uchida
2018-12-25 18:00:45 +09:00
committed by GitHub
3 changed files with 33 additions and 0 deletions
+5
View File
@@ -1321,6 +1321,11 @@ fn next(&mut self) -> Option<Self::Item> {
}
}
// Workaround for CRLF newline.
if line.ends_with('\r') {
line.pop();
}
Some((self.kind, line))
}
}
+14
View File
@@ -0,0 +1,14 @@
// rustfmt-newline_style: Windows
#[cfg(test)]
mod test {
summary_test! {
tokenize_recipe_interpolation_eol,
"foo: # some comment
{{hello}}
",
"foo: \
{{hello}} \
{{ahah}}",
"N:#$>^{N}$<.",
}
}
+14
View File
@@ -0,0 +1,14 @@
// rustfmt-newline_style: Windows
#[cfg(test)]
mod test {
summary_test! {
tokenize_recipe_interpolation_eol,
"foo: # some comment
{{hello}}
",
"foo: \
{{hello}} \
{{ahah}}",
"N:#$>^{N}$<.",
}
}