Changeset View
Changeset View
Standalone View
Standalone View
bin/ls/tests/ls_tests.sh
Show First 20 Lines • Show All 840 Lines • ▼ Show 20 Lines | u_flag_body() | ||||
atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' | atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' | ||||
atf_check -e empty -o match:'i am a' -s exit:0 cat a.file | atf_check -e empty -o match:'i am a' -s exit:0 cat a.file | ||||
atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' | atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' | ||||
atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu | atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu | ||||
} | } | ||||
atf_test_case v_flag | |||||
v_flag_head() | |||||
{ | |||||
atf_set "descr" "Verify that the output from ls -v sorts based on strverscmp(3)" | |||||
} | |||||
v_flag_body() | |||||
{ | |||||
create_test_dir | |||||
atf_check -e empty -o empty -s exit:0 touch 000 00 01 010 09 0 1 9 10 | |||||
atf_check -e empty -o match:"000.00.01.010.09.0.1.9.10" -s exit:0 sh -c 'ls -Cv' | |||||
} | |||||
atf_test_case x_flag | atf_test_case x_flag | ||||
x_flag_head() | x_flag_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that the output from ls -x is multi-column, sorted across" | atf_set "descr" "Verify that the output from ls -x is multi-column, sorted across" | ||||
} | } | ||||
x_flag_body() | x_flag_body() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | atf_init_test_cases() | ||||
atf_add_test_case n_flag | atf_add_test_case n_flag | ||||
atf_add_test_case o_flag | atf_add_test_case o_flag | ||||
atf_add_test_case p_flag | atf_add_test_case p_flag | ||||
atf_add_test_case q_flag_and_w_flag | atf_add_test_case q_flag_and_w_flag | ||||
atf_add_test_case r_flag | atf_add_test_case r_flag | ||||
atf_add_test_case s_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 u_flag | ||||
atf_add_test_case v_flag | |||||
atf_add_test_case x_flag | atf_add_test_case x_flag | ||||
atf_add_test_case y_flag | atf_add_test_case y_flag | ||||
atf_add_test_case 1_flag | atf_add_test_case 1_flag | ||||
} | } |