From 4b6e5737241feacc0764e56e438cabee2ff3429e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 20 Dec 2016 21:35:51 -0500 Subject: Implement -mnewer --- parse.c | 1 + tests.sh | 12 +++++++++++- tests/test_0120.out | 4 ++++ tests/test_0121.out | 4 ++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/test_0120.out create mode 100644 tests/test_0121.out diff --git a/parse.c b/parse.c index c1cfd3a..1697b7b 100644 --- a/parse.c +++ b/parse.c @@ -1824,6 +1824,7 @@ static const struct table_entry parse_table[] = { {"maxdepth", false, parse_depth_limit, false}, {"mindepth", false, parse_depth_limit, true}, {"mmin", false, parse_acmtime, MTIME, MINUTES}, + {"mnewer", false, parse_acnewer, MTIME}, {"mount", false, parse_mount}, {"mtime", false, parse_acmtime, MTIME, DAYS}, {"name", false, parse_name, false}, diff --git a/tests.sh b/tests.sh index 8d9a49b..3e936e0 100755 --- a/tests.sh +++ b/tests.sh @@ -745,9 +745,19 @@ function test_0119() { bfs_diff basic -uid "$(id -un)" } +function test_0120() { + [ "$BSD" ] || return 0 + bfs_diff times -mnewer times/a +} + +function test_0121() { + [ "$BSD" ] || return 0 + bfs_diff -H times -mnewer times/l +} + result=0 -for i in {1..119}; do +for i in {1..121}; do test="test_$(printf '%04d' $i)" if [ -t 1 ]; then diff --git a/tests/test_0120.out b/tests/test_0120.out new file mode 100644 index 0000000..7f6c0dd --- /dev/null +++ b/tests/test_0120.out @@ -0,0 +1,4 @@ +times +times/b +times/c +times/l diff --git a/tests/test_0121.out b/tests/test_0121.out new file mode 100644 index 0000000..7f6c0dd --- /dev/null +++ b/tests/test_0121.out @@ -0,0 +1,4 @@ +times +times/b +times/c +times/l -- cgit v1.2.3