aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/du/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* du_test: Skip three tests if sparse files are not supportedAlex Richardson2021-02-031-0/+14
| | | | | | | | | This fixes running the du tests with /tmp as tmpfs (which is what we do in the CheriBSD CI). Obtained from: CheriBSD Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28398
* du: tests: use dollar-single quotes where appropriateKyle Evans2021-01-291-1/+1
| | | | | | | No need for "foo$(printf "\t")", $'\t' is both more readable and still functional. Reported-by: Jamie Landeg-Jones <jamie@catflap.org>
* du: tests: make H_flag tests more strict about output requirementsKyle Evans2021-01-071-4/+12
| | | | | | | | | | | | | | The current version of this test will effectively pass as long as one of the specified paths is in the output, and it could even be a subset of one of the paths. Strengthen up the test a little bit: * Specify beginning/end anchors for each path * Add egrep -v checks to make sure we don't have any *additional* paths * Ratchet down paths2 to exactly the two paths we expect to appear Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D27984
* du: tests: fix the H_flag test (primarily grep usage)Kyle Evans2021-01-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test attempts to use \t (tab intended) in a grep expression. With the former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'. The expression would work anyways because the tr(1) usage would ultimately replace all of the spaces with a single newline, and they would match the paths whether they were correctly fromatted or not. Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a property of the underlying regex(3) engine, to make it easier to identify when stuff like this happens. In-fact, this expression broke after the switch happened. This revision does the bare basics to fix the usage by using a printf to get a literal tab character to insert into the expression. It also swaps out the manual insertion of the line prefix into the grep expression by pulling that part out of $sep and reusing it for the leading path. The secondary issue was the tr(1) usage, since tr would only replace the first character of string1 with the first character of string2. This has instead been replaced by a sed expression, which similary understands \n to be a newline on all supported versions of FreeBSD. Each path now gets prefixed with the appropriate context that should be there (i.e. numeric sequence followed by a tab). PR: 252446 Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D27983
* Update the spelling of my nameEnji Cooper2019-04-221-2/+1
| | | | | | | | | | | | Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji instead for clarity. While here, remove "All Rights Reserved" from copyrights I "own". MFC after: 1 week Notes: svn path=/head/; revision=346571
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-311-0/+11
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* du(1): Add --si option to display in terms of powers of 1000Kyle Evans2017-08-091-0/+15
| | | | | | | | | Reviewed by: cem (earlier version), emaste Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11748 Notes: svn path=/head/; revision=322291
* Add some initial basic tests for du(1)Enji Cooper2017-06-122-0/+158
Tests that exercise the following flags are added in this commit: - -A - -H - -I - -g - -h - -k - -m Additional tests will be added soon. MFC after: 1 month Notes: svn path=/head/; revision=319850