diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-07-20 23:33:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-07-20 23:33:43 -0400 |
commit | 4242283189a94a79dda78540efe78b2666a944cc (patch) | |
tree | 831d2e27413db667239c8f60fad64d447026dd44 /tests.sh | |
parent | 03adbcf0aa8914fd5556b7913901c98a6940fae4 (diff) | |
download | bfs-4242283189a94a79dda78540efe78b2666a944cc.tar.xz |
Implement -exit [STATUS]
From NetBSD again.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -255,6 +255,7 @@ bsd_tests=( test_inum test_nogroup test_nouser + test_exit ) gnu_tests=( @@ -1202,6 +1203,20 @@ function test_deep_strict() { bfs_diff deep -mindepth 18 } +function test_exit() { + $BFS basic -name foo -exit 42 + if [ $? -ne 42 ]; then + return 1 + fi + + $BFS basic -name qux -exit 42 + if [ $? -ne 0 ]; then + return 1 + fi + + bfs_diff basic -name bar -exit -o -print +} + passed=0 failed=0 |