Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 2015 06:31:30 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r288651 - user/ngie/more-tests/bin/ls/tests
Message-ID:  <201510040631.t946VUFV048474@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun Oct  4 06:31:30 2015
New Revision: 288651
URL: https://svnweb.freebsd.org/changeset/base/288651

Log:
  Add ls -m testcases and check for /usr/bin/bc in the ls -h testcases

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 06:22:23 2015	(r288650)
+++ user/ngie/more-tests/bin/ls/tests/ls_tests.sh	Sun Oct  4 06:31:30 2015	(r288651)
@@ -371,6 +371,7 @@ g_flag_body()
 h_flag_head()
 {
 	atf_set "descr" "Verify that -h prints out the humanized units for file sizes with ls -l"
+	atf_set "require.files" "/usr/bin/bc"
 }
 
 h_flag_body()
@@ -458,6 +459,24 @@ lcomma_flag_body()
 	    env LC_ALL=en_US.ISO8859-1 ls -l, i
 }
 
+m_flag_head()
+{
+	atf_set "descr" "Verify that the output from ls -m is comma-separated"
+}
+
+m_flag_body()
+{
+	create_test_dir
+
+	output=$PWD/../output
+
+	atf_check -e empty -o empty -s exit:0 touch ,, "a,b " c d e
+
+	atf_check -e empty -o save:$output -s exit:0 ls -m
+
+	atf_check_equal "$(cat $output)" ",,, a,b , c, d, e"
+}
+
 n_flag_head()
 {
 	atf_set "descr" "Verify that the output from ls -n prints out numeric GIDs/UIDs instead of symbolic GIDs/UIDs"
@@ -733,7 +752,7 @@ atf_init_test_cases()
 	atf_add_test_case k_flag
 	#atf_add_test_case l_flag
 	atf_add_test_case lcomma_flag
-	#atf_add_test_case m_flag
+	atf_add_test_case m_flag
 	atf_add_test_case n_flag
 	atf_add_test_case o_flag
 	atf_add_test_case p_flag



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510040631.t946VUFV048474>