Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Hofstetter 55f297fd88 tests: remove "extern crate x" 2024-03-26 16:14:24 +01:00
Sylvestre Ledru d7bb67e53d Fix more clippy warnings 2023-04-02 18:53:40 +02:00
Jez Ng 30a22453d6 Add support for embedded "{}"
Given

  find . -exec foo{}bar \;

GNU find will replace `{}` by the filename. This commit matches that
behavior.

Note that this is not required by the POSIX spec.

The GNU testsuite doesn't cover this case, so I've added a test in this
repo.
2023-02-23 23:38:40 +01:00
Sylvestre Ledru 4eb943fea2 rustfmt recent changes 2022-02-05 15:16:36 +01:00
Sylvestre Ledru f399291533 fix clippy warning: Fix the needless_pass_by_value 2022-02-05 15:09:29 +01:00
Sylvestre Ledru f9e736d194 replace tempdir by tempfile 2021-09-07 10:36:07 +02:00
Tavian Barnes 88cbbff332 exec: Handle parent directories more carefully
Fixes #23, fixes #28.
2021-03-28 17:47:46 -04:00
Alex Lyon 73d4ad5b8f Format using rustfmt 2019-04-24 03:06:42 -07:00
mcharsley a3e8f51b6d Merge branch 'master' into master 2017-06-30 14:21:45 +01:00
Mark Charsley 8c7cf29e69 Fix for issue #23 -execdir fails for the root directory 2017-06-30 14:17:34 +01:00
mcharsley 1a6262cd5f Fixed windows compatability (#21)
* Deleted vertical whitespace

In an attempt to get around a mistake I made when merging from the
master fork

* Added a default implementation for has_side_effects

And removed all the "return false" implementations (as specified by most
of the Matchers).

* Added support for -exec and -execdir

* Fixed path_to_testing_commandline

* Minor tweaks from code review

* Added support for -perm

* Fixed string constant

* Fixed error caused by merging changes

* Tweaks after code review

* Fixed windows compatability. This required
 - changing a lot of test code to supply/expect backslashes rather than
slashes when running on windows
  - tweaking the way testing-commandline reported its args (debug format
escapes backslashes when printing strings)
  - changing the NewerMatcher to get metadata from fs::metadata() rather
than from File's metadata method (the latter caused mysterious test
failures, which I didn't bother tracking down becasue the former is more
efficient anyway)
  - hiding more of perm.rs behind #[cfg(unix)] to stop "unused X"
warnings

* Revert "Fixed windows compatability. This required"

This reverts commit 0e2c385237.

* Revert "Revert "Fixed windows compatability. This required""

This reverts commit 384da6d2f4.
2017-03-27 11:11:11 +01:00
Mark Charsley 372493be7c Revert "Revert "Fixed windows compatability. This required""
This reverts commit 384da6d2f4.
2017-03-24 14:56:40 +00:00
Mark Charsley 384da6d2f4 Revert "Fixed windows compatability. This required"
This reverts commit 0e2c385237.
2017-03-24 14:44:43 +00:00
mcharsley 0e2c385237 Fixed windows compatability. This required
- changing a lot of test code to supply/expect backslashes rather than
slashes when running on windows
  - tweaking the way testing-commandline reported its args (debug format
escapes backslashes when printing strings)
  - changing the NewerMatcher to get metadata from fs::metadata() rather
than from File's metadata method (the latter caused mysterious test
failures, which I didn't bother tracking down becasue the former is more
efficient anyway)
  - hiding more of perm.rs behind #[cfg(unix)] to stop "unused X"
warnings
2017-03-24 14:38:37 +00:00
mcharsley 8b3842b1f9 Added support for -exec[dir] (#17)
* Deleted vertical whitespace

In an attempt to get around a mistake I made when merging from the
master fork

* Added a default implementation for has_side_effects

And removed all the "return false" implementations (as specified by most
of the Matchers).

* Added support for -exec and -execdir

* Fixed path_to_testing_commandline

* Minor tweaks from code review
2017-03-17 17:02:45 +00:00
mcharsley 32fa744cf8 Added support for -exec and -execdir 2017-03-15 16:58:48 +00:00