Fix a non-termination bug.

This was a very silly bug. Instead of creating a particular atomic once
and cloning it, we created a new value for each worker.

Fixes #279
This commit is contained in:
Andrew Gallant
2016-12-12 06:55:49 -05:00
parent 6d346a09de
commit bb70f96743
2 changed files with 11 additions and 1 deletions

View File

@@ -968,6 +968,15 @@ clean!(regression_256_j1, "test", "foo", |wd: WorkDir, mut cmd: Command| {
assert_eq!(lines, "foo/baz:test\n");
});
// See: https://github.com/BurntSushi/ripgrep/issues/279
clean!(regression_279, "test", ".", |wd: WorkDir, mut cmd: Command| {
wd.create("foo", "test");
cmd.arg("-q");
let lines: String = wd.stdout(&mut cmd);
assert_eq!(lines, "");
});
// See: https://github.com/BurntSushi/ripgrep/issues/7
sherlock!(feature_7, "-fpat", "sherlock", |wd: WorkDir, mut cmd: Command| {
wd.create("pat", "Sherlock\nHolmes");