]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r319834,r319841,r320723,r320724:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Jul 2017 21:01:07 +0000 (21:01 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Jul 2017 21:01:07 +0000 (21:01 +0000)
commitc84b2f620a2c1079f221208009e46eb506881bc7
treeda7df3c615500d189d711bf0581d3e6c57a68711
parentf0990e3238faadf402c7262dfb90987d1eee192d
MFC r319834,r319841,r320723,r320724:

r319834:

Write up some basic tests for readlink(1)

The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic).

r319841:

Add initial tests for stat(1)

Testcases for -H, -L, and -f haven't been implemented yet, in part due
to additional complexity needed to validate the features:
* -H and -f will require an external "helper" program to display/modify
  the state/permissions for a given path.
* -L is being covered partially via the -n testcase today.

r320723:

Use %e instead of %d with x_output_date(..)

stat -x doesn't 0-fill days so %d is inappropriate. %e is correct.

MFC with: r319841

r320724:

:l_flag:: be more aggressive when normalizing whitespace

Save output from ls -ldT and stat -l, then normalize all repeating whitespace using
sed to single column spaces.

This makes the test flexible with single-digit days, etc, similar to r320723. This
approach is just a bit more of a hammer approach because of how the columns are
ordered/spaced in both ls and stat.

MFC with: r319841

git-svn-id: svn://svn.freebsd.org/base/stable/10@321085 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/mtree/BSD.tests.dist
usr.bin/stat/Makefile
usr.bin/stat/stat.1
usr.bin/stat/tests/Makefile [new file with mode: 0644]
usr.bin/stat/tests/readlink_test.sh [new file with mode: 0755]
usr.bin/stat/tests/stat_test.sh [new file with mode: 0755]