summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-09 23:24:01 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-09 23:24:01 -0400
commit76331e5feca2520f4a7a70f573fce9dcdef44d90 (patch)
treeb51b3a760200a1e0e2b8534037f78c4b46fc89e4 /tests
parent1e678d70527faee4b7c3b246a64ee5ca4a15c497 (diff)
Fix test that relied on non-deterministic order of results.
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index fbfef2dc..6c2040fa 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -102,7 +102,7 @@ sherlock!(with_heading_default, "Sherlock", ".",
wd.create("foo", "Sherlock Holmes lives on Baker Street.");
cmd.arg("-j1").arg("--heading");
let lines: String = wd.stdout(&mut cmd);
- let expected = "\
+ let expected1 = "\
foo
Sherlock Holmes lives on Baker Street.
@@ -110,7 +110,15 @@ sherlock
For the Doctor Watsons of this world, as opposed to the Sherlock
be, to a very large extent, the result of luck. Sherlock Holmes
";
- assert_eq!(lines, expected);
+ let expected2 = "\
+sherlock
+For the Doctor Watsons of this world, as opposed to the Sherlock
+be, to a very large extent, the result of luck. Sherlock Holmes
+
+foo
+Sherlock Holmes lives on Baker Street.
+";
+ assert!(lines == expected1 || lines == expected2);
});
sherlock!(inverted, |wd: WorkDir, mut cmd: Command| {