Skip to content

Commit

Permalink
Added test for issue BurntSushi#416
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Strand authored and Kyle Strand committed Mar 22, 2017
1 parent 685cc6c commit a1c83df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,21 @@ fn regression_391() {
assert_eq!(lines, "bar.py\n");
}

// See: https://github.com/BurntSushi/ripgrep/issues/416
#[test]
fn regression_416() {
let wd = WorkDir::new("regression_416");
wd.create("cf_lf_eol", "foo\r\nbar\r\nbaz\r\n");
// TODO: consider adding files to check behavior when `\r` is *not* followed by `\n`

let mut cmd = wd.command();
cmd.arg("bar$");

let lines: String = wd.stdout(&mut cmd);
assert_eq!(lines, "bar\n");

}

#[test]
fn type_list() {
let wd = WorkDir::new("type_list");
Expand Down

0 comments on commit a1c83df

Please sign in to comment.