diff --git a/tests/tests.rs b/tests/tests.rs index 1b89444..be9bd20 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -536,22 +536,19 @@ fn test_symlink() { fn test_exec() { let te = TestEnv::new(); - // Test a simple echo before each result - te.assert_output( - &["--exec", "echo found", "foo"], - "found a.foo - found one/b.foo - found one/two/c.foo - found one/two/C.Foo2 - found one/two/three/d.foo - found one/two/three/directory_foo", - ); + // Test a simple echo before result + te.assert_output(&["--exec", "echo found", "d.foo"], "found one/two/three/d.foo"); + #[cfg(windows)] // Test executing 'fc' (File Compare) with the found result and itself. te.assert_output( &["--exec", "fc {} {}", "a.foo"], " Comparing files a.foo and A.FOO - FC: no differences encountered" + FC: no differences encountered", ); -} \ No newline at end of file + + #[cfg(unix)] + // Test executing 'diff' with the found result and itself. + te.assert_output(&["--exec", "diff {} {}", "a.foo"],""); +}