Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/find Now that this works, test also some rando...



details:   https://anonhg.NetBSD.org/src/rev/0def343ae1bc
branches:  trunk
changeset: 778191:0def343ae1bc
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Mar 18 18:32:16 2012 +0000

description:
Now that this works, test also some random exit statuses.

diffstat:

 tests/usr.bin/find/t_find.sh |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 640dc128f3e6 -r 0def343ae1bc tests/usr.bin/find/t_find.sh
--- a/tests/usr.bin/find/t_find.sh      Sun Mar 18 18:09:45 2012 +0000
+++ b/tests/usr.bin/find/t_find.sh      Sun Mar 18 18:32:16 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_find.sh,v 1.2 2012/03/18 18:09:45 dholland Exp $
+# $NetBSD: t_find.sh,v 1.3 2012/03/18 18:32:16 jruoho Exp $
 #
 # Copyright (c) 2012 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,6 +38,17 @@
                -s exit:0 -x "find /etc -type f -exit"
 }
 
+atf_test_case exit_status
+exit_status_head() {
+       atf_set "descr" "Test exit status from 'find -exit'"
+}
+
+exit_status_body() {
+       num=$(jot -r 1 0 99)
+       atf_check -o ignore -e ignore -s exit:$num -x "find / -exit $num"
+}
+
 atf_init_test_cases() {
        atf_add_test_case exit
+       atf_add_test_case exit_status
 }



Home | Main Index | Thread Index | Old Index