Date: Sun, 4 Oct 2015 09:16:28 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r288660 - user/ngie/more-tests/bin/ls/tests Message-ID: <201510040916.t949GSIP023419@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sun Oct 4 09:16:27 2015 New Revision: 288660 URL: https://svnweb.freebsd.org/changeset/base/288660 Log: Add testcases that exercise ls -b and ls -T 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 08:36:28 2015 (r288659) +++ user/ngie/more-tests/bin/ls/tests/ls_tests.sh Sun Oct 4 09:16:27 2015 (r288660) @@ -346,6 +346,25 @@ S_flag_body() atf_check_equal "$WITHOUT_S_parsed" "$WITH_S_parsed" } +atf_test_case T_flag +T_flag_head() +{ + atf_set "descr" "Verify -T support" +} + +T_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + + birthtime_in_secs=$(stat -f %B -t %s a.file) + birthtime=$(date -j -f %s $birthtime_in_secs +"[[:space:]]+%b[[:space:]]+%e[[:space:]]+%H:%M:%S[[:space:]]+%Y") + + atf_check -e empty -o match:"$birthtime"'[[:space:]]+a\.file' \ + -s exit:0 ls -lT a.file +} + atf_test_case a_flag a_flag_head() { @@ -380,6 +399,20 @@ a_flag_body() done } +atf_test_case b_flag +b_flag_head() +{ + atf_set "descr" "Verify that the output from ls -b prints out non-printable characters" +} + +b_flag_body() +{ + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" + + atf_check -e empty -o empty -s exit:0 touch "$(printf "y\013z")" + atf_check -e empty -o match:'y\\vz' -s exit:0 ls -b +} + atf_test_case d_flag d_flag_head() { @@ -802,12 +835,12 @@ atf_init_test_cases() #atf_add_test_case P_flag #atf_add_test_case R_flag atf_add_test_case S_flag - #atf_add_test_case T_flag + atf_add_test_case T_flag #atf_add_test_case U_flag #atf_add_test_case W_flag #atf_add_test_case Z_flag atf_add_test_case a_flag - #atf_add_test_case b_flag + atf_add_test_case b_flag #atf_add_test_case c_flag atf_add_test_case d_flag #atf_add_test_case f_flag
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510040916.t949GSIP023419>