Date: Mon, 5 Oct 2015 00:02:58 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r288676 - user/ngie/more-tests/bin/ls/tests Message-ID: <201510050002.t9502wFD094713@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Oct 5 00:02:58 2015 New Revision: 288676 URL: https://svnweb.freebsd.org/changeset/base/288676 Log: Add a testcase for ls -f Modified: user/ngie/more-tests/bin/ls/tests/ls_tests.sh Modified: user/ngie/more-tests/bin/ls/tests/ls_tests.sh ============================================================================== --- user/ngie/more-tests/bin/ls/tests/ls_tests.sh Sun Oct 4 23:50:02 2015 (r288675) +++ user/ngie/more-tests/bin/ls/tests/ls_tests.sh Mon Oct 5 00:02:58 2015 (r288676) @@ -493,6 +493,31 @@ d_flag_body() done } +atf_test_case f_flag +f_flag_head() +{ + atf_set "descr" "Verify that -f prints out the contents of a directory unsorted" +} + +f_flag_body() +{ + create_test_inputs + + output=$PWD/../output + + # XXX: I don't have enough understanding of how the algorithm works yet + # to determine more than the fact that all the entries printed out + # exist + paths=$(find -s . -mindepth 1 -maxdepth 1 \! -name '.*' -exec basename {} \; ) + + atf_check -e empty -o save:$output -s exit:0 ls -f + + for path in $paths; do + atf_check -e ignore -o not-empty -s exit:0 \ + egrep "^$path$" $output + done +} + atf_test_case g_flag g_flag_head() { @@ -922,7 +947,7 @@ atf_init_test_cases() atf_add_test_case b_flag #atf_add_test_case c_flag atf_add_test_case d_flag - #atf_add_test_case f_flag + atf_add_test_case f_flag atf_add_test_case g_flag atf_add_test_case h_flag atf_add_test_case i_flag
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510050002.t9502wFD094713>