From 76331e5feca2520f4a7a70f573fce9dcdef44d90 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Fri, 9 Sep 2016 23:24:01 -0400 Subject: [PATCH] Fix test that relied on non-deterministic order of results. --- tests/tests.rs | 12 ++++++++++-- 1 file 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| {