summaryrefslogtreecommitdiffstats
path: root/tests/bfs
Commit message (Collapse)AuthorAgeFilesLines
* tests: Improve color case insensitivity coverageTavian Barnes2024-06-052-6/+6
|
* tests: New inaccessible/ directory tree for permission errorsTavian Barnes2024-06-042-10/+2
|
* parse: Allow -Darg/-Sarg as well as -D arg / -S argTavian Barnes2024-06-036-0/+59
|
* parse: Handle multiple flags at once like -LEXO2Tavian Barnes2024-06-033-0/+19
| | | | | | | | | | | | | | | | | | | | | The POSIX Utility Syntax Guidelines specify that flag groups like -HL should be handled like -H -L. GNU find doesn't support grouping flags in this way, but BSD find does. To avoid conflicts with non-flag primaries, for now we require at least one flag in a group to be a capital letter. That is, we support things like -Lds but not -ds. We also do not support -fPATH (without a space) as it would conflict with -follow, -fprint, etc. It is impossible to be compatible with both GNU and BSD find here: user@gnu$ find -follow link link/file ... user@bsd$ find -follow find: ollow: No such file or directory Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
* tests: Add some more weird namesTavian Barnes2024-05-282-0/+16
|
* bfstd: Treat ELOOP like ENOENTTavian Barnes2024-05-271-1/+8
| | | | | | | GNU findutils just made the same change, so looping symlinks will be considered broken rather than a hard error. Link: https://savannah.gnu.org/bugs/?51926
* printf: The ' ' (space) flag must be numericTavian Barnes2024-05-191-0/+1
|
* Implement -limit NTavian Barnes2024-03-206-0/+9
| | | | Closes: https://github.com/tavianator/bfs/issues/133
* tests/bfs/D_opt: Don't rely on directory link countsTavian Barnes2024-02-282-12/+1
| | | | Fixes: https://github.com/tavianator/bfs/issues/131
* bftw: stat() files asynchronouslyTavian Barnes2024-02-061-1/+1
|
* tests: Don't clobber inherited FDsTavian Barnes2024-02-011-1/+1
| | | | | Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them.
* tests/bfs/D_opt: New test for more -D opt coverageTavian Barnes2024-01-072-0/+19
|
* tests: Remove unneeded command -v unbuffer || skipTavian Barnes2024-01-012-4/+0
|
* parse: Reject integers that start with whitespaceTavian Barnes2023-12-091-0/+1
|
* Treat NO_COLOR="" the same as unsetTavian Barnes2023-11-062-0/+32
| | | | | | | | | | | | | | The docs say > Command-line software which adds ANSI color to its output by default > should check for a NO_COLOR environment variable that, when present > and not an empty string (regardless of its value), prevents the > addition of ANSI color. but we were not checking for the empty string. Link: https://no-color.org/ Link: https://github.com/sharkdp/fd/pull/1421
* tests/bfs/help: Fix exit statusTavian Barnes2023-10-231-4/+4
|
* tests/bfs/help: Use ... && fail instead of ! ...Tavian Barnes2023-10-231-4/+4
| | | | ! false doesn't trigger an error with set -e.
* tests/bfs/printf_color: Fix race conditionTavian Barnes2023-10-232-1/+2
| | | | | Invoking bfs in the top directory can lead it to explore other tests' scratch directories, so explicitly exclude them.
* tests: Fix Bash 3 compatibilityTavian Barnes2023-10-231-4/+2
|
* tests: Use test-specific scratch directoriesTavian Barnes2023-10-226-20/+17
|
* tests: Refactor implementation into separate filesTavian Barnes2023-10-191-2/+0
|
* tests: Move closed_std* tests out of the POSIX groupTavian Barnes2023-10-144-0/+28
| | | | | | | | | | | | | POSIX actually says > If the utility would be executed with file descriptor 0, 1, or 2 > closed, implementations may execute the utility with the file > descriptor open to an unspecified file. So we're not guaranteed to be able to detect the situation in the first place. Add a best-effort check for these platforms and skip the test. Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
* tests/bfs/status: Try to test SIGWINCHTavian Barnes2023-10-061-1/+1
|
* tests: New bfs_pty wrapper for unbufferTavian Barnes2023-10-063-7/+3
|
* tests/bfs: Add a test that runs -statusTavian Barnes2023-10-051-0/+3
|
* tests/bfs: Add tests for color autodetectionTavian Barnes2023-10-054-0/+65
|
* color: Only highlight the trailing slash on ENOTDIRTavian Barnes2023-07-132-5/+5
|
* color: Don't break up leading and trailing dirsTavian Barnes2023-07-1339-61/+63
|
* color: TTY-escape filenamesTavian Barnes2023-07-1338-0/+76
|
* color: Get rid of EXT_MAXTavian Barnes2023-07-132-0/+23
|
* parse: Reject -j0Tavian Barnes2023-07-121-0/+1
|
* tests/bfs: Add tests for -jTavian Barnes2023-07-125-0/+41
|
* color: Compare values too when deciding to smart-caseTavian Barnes2023-06-302-2/+7
|
* color: Implement smart casingTavian Barnes2023-06-295-10/+12
| | | | | | | | | Since coreutils 9.2, ls does case-sensitive extension matching if the same extension is capitalized differently in $LS_COLORS. Implement the same logic. Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33123 Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9086
* tests/bfs/color: Add mixed-case extensionsTavian Barnes2023-06-2938-114/+304
|
* color: `fi=0` should not fall back to `no`Tavian Barnes2023-06-088-0/+84
|
* tests: Use bfs_sudo wrapper instead of testing $SUDOTavian Barnes2022-12-292-4/+2
|
* tests/bfs/printf_everything: Simplify double negationTavian Barnes2022-12-161-2/+2
|
* tests: Fail early in bfs_diff if the diff failsTavian Barnes2022-12-161-1/+1
| | | | Otherwise, propagate the exit code from bfs
* tests: Print the skip reason for --verbose=skippedTavian Barnes2022-12-161-4/+1
|
* tests: Turn on set -eTavian Barnes2022-12-164-12/+9
|
* tests: Move crash detection into invoke_bfs, use ! instead of failTavian Barnes2022-12-1631-32/+32
|
* tests: Replace skip_unless test with test || skipTavian Barnes2022-12-167-11/+11
|
* parse: Fix crash on -xdev -mountTavian Barnes2022-11-302-0/+21
|
* parse: Pass the right argument when warning about -O9Tavian Barnes2022-11-302-0/+22
|
* typo: Array bounds are exclusive, not inclusiveTavian Barnes2022-11-101-0/+1
|
* tests/xtouch: New utilityTavian Barnes2022-11-073-3/+3
| | | | | | POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't implement it. Making our own utility also lets us add some handy extensions like -p (create parents) and -M (set permissions).
* tests: Skip fstype tests if the mtab isn't availableTavian Barnes2022-11-061-1/+7
|
* tests: Add a helper for cleaning scratchTavian Barnes2022-10-204-4/+4
| | | | And try to unmount things if the a test left them mounted.
* tests: Coverage number go upTavian Barnes2022-10-199-0/+70
|