summaryrefslogtreecommitdiffstats
path: root/tests.sh
AgeCommit message (Collapse)Author
2022-03-15tests: Use bfs_diff in more casesTavian Barnes
2022-03-14tests: Shell style fixesTavian Barnes
We now support `./tests.sh --bfs="path/with\ spaces/bfs"`
2022-03-13tests: Use -print0 instead of -printf '%p ' for exec flush testsTavian Barnes
2022-03-13tests: Use plain sort, not bfs_sortTavian Barnes
bfs_sort existed to keep the test outputs nicely in breadth-first order. Unfortunately the implementation using awk didn't support NUL bytes.
2022-03-13tests: Use skip_if for more testsTavian Barnes
2022-02-28parse: Check for globs with unescaped trailing backslashesTavian Barnes
Both macOS and musl fail to fail on an unescaped backslash, so check for it ourselves. Link: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html Link: https://github.com/void-linux/void-packages/pull/35836 Link: https://www.openwall.com/lists/musl/2022/02/25/2 Link: https://www.austingroupbugs.net/view.php?id=806
2022-02-24regex: Use the encoding from the current localeTavian Barnes
2022-02-18tests: Mark -fprint/-exec flushing test bfs-specificTavian Barnes
GNU find doesn't do it, so no reason to require it for compatibility.
2022-02-11exec: Flush I/O streams before executing anythingTavian Barnes
Otherwise output from commands may appear unexpectedly earlier than output from bfs. We use fflush(NULL) to flush all streams, which is more than GNU find does, but seems to be a useful extension.
2022-02-11tests: Use skip_if for tests that need /dev/fullTavian Barnes
2022-02-10tests: Add a test that -exit suppresses the implicit -printTavian Barnes
2022-02-08tests: Skip case insensitive tests if FNM_CASEFOLD is missingTavian Barnes
2022-02-08tests: Separate skipped tests from passing testsTavian Barnes
2022-02-04tests: Disable some glob tests on macOSTavian Barnes
macOS seems to have a non-compliant fnmatch() that doesn't treat invalid character class expressions literally.
2022-02-04regex: Add support for emacs and grep typesTavian Barnes
2022-02-02tests: Add tests for syntactically invalid globsTavian Barnes
2022-02-01tests: New tests for -i?wholenameTavian Barnes
2022-02-01tests: New test for ** in a globTavian Barnes
2022-02-01tests: New test for -prune on a non-directoryTavian Barnes
2022-02-01tests: Try to color diff outputTavian Barnes
2022-02-01tests: set -P for the whole scriptTavian Barnes
We rely on physical path resolution in test_execdir_pwd.
2022-02-01tests: Allow tests.sh to be invoked from any directoryTavian Barnes
This also resolves the path passed to --bfs early, so --bfs=./bfs now works.
2022-01-30parse: Add support for ed and sed regexesTavian Barnes
They're apparently the same as POSIX basic regexes.
2022-01-29Revert "tests: Add a test for posix-basic alternation"Tavian Barnes
Turns out alternation is not actually part of the POSIX basic regular expression language, it's just a glibc extension. This reverts commit c898af13a671ee92a056467d324f16823594eb1c.
2022-01-29tests: Add a test for posix-basic alternationTavian Barnes
2021-12-19ci/macos: Switch back to macos-latestTavian Barnes
2021-12-10tests: Set TZ to a real timezoneTavian Barnes
POSIX states that the offset is not optional in the TZ environment variable. Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html
2021-10-19parse: Switch back to O_TRUNC from explicit ftruncate()Tavian Barnes
O_TRUNC is not equivalent to an unconditional ftruncate(), e.g. for device files. This reverts the behaviour change from 78944c81, which was never released and is not supported in other find implementations.
2021-10-19tests: Distinguish between failures and crashesTavian Barnes
2021-10-19tests: Set abort_on_error=1 for the sanitizersTavian Barnes
This makes it easier to distinguish crashes from expected failures
2021-10-09printf: Colorize file names/paths in simple casesTavian Barnes
2021-10-01tests: Add a test for an operator in an unexpected positionTavian Barnes
2021-10-01tests: Add tests for parsing invalid integersTavian Barnes
And give some better error messages.
2021-10-01tests: Add a tests for missing and nonexistent pathsTavian Barnes
2021-09-26Don't truncate files until we know they're not duplicatesTavian Barnes
2021-09-21ctx: Also deduplicate the standard streamsTavian Barnes
This fixes some potential missing output when the same file is used in a redirection and something like -fprint. The main benefit is smarter handling of /dev/stdout, which will now share the CFILE* with cout.
2021-09-15tests: Make the -files0-from tests weirderTavian Barnes
2021-09-15Implement -files0-from FILETavian Barnes
See https://savannah.gnu.org/bugs/?60383 for the development of the corresponding GNU find feature.
2021-08-05Use /usr/bin/env bash as the shebang in scriptsTavian Barnes
This should reduce the need for patches on the BSDs.
2021-06-02Implement time units for -{a,B,c,m}timeTavian Barnes
From FreeBSD find. Closes #75.
2021-05-20tests: Don't use -perm /MODE in POSIX testsTavian Barnes
2021-04-18tests: Optimize test_delete_many()Tavian Barnes
2021-04-18tests: Don't fail -flags test if we can't set flagsTavian Barnes
2021-04-18tests: Don't fail xattr tests if we can't set xattrs at allTavian Barnes
2021-04-18tests: Add a test for deleting large directoriesTavian Barnes
This serves as a test for https://github.com/tavianator/bfs/issues/67
2021-03-28test: Add more tests for -H/-L and -type lTavian Barnes
2021-03-23tests: Actually remove capabilities after dropping themTavian Barnes
2021-03-22tests: Avoid looping forever when failing to drop capabilitiesTavian Barnes
Link: https://github.com/void-linux/void-packages/pull/29437/checks?check_run_id=2169825021
2021-03-21tests: Drop capabilities when run as root on LinuxTavian Barnes
bfs's tests rely on file permissions being enforced, which leads them to work incorrectly when run as root. This is probably the most common packaging issue for bfs, most recently seen with Void Linux's update to bfs 2.2. Make it easier on packagers by using capsh, if it's available, to drop the DAC privileges for the tests. Link: https://github.com/void-linux/void-packages/pull/29437#issuecomment-798670288 Link: https://salsa.debian.org/lamby/pkg-bfs/-/commit/b173efb35da126adb39b0984219d6a2fd9ff428f
2021-03-06Implement -flags, from FreeBSD findTavian Barnes
This is the last BSD-specific primary I'm aware of. Fixes #14.