Changeset View
Changeset View
Standalone View
Standalone View
bin/ls/tests/ls_tests.sh
Show First 20 Lines • Show All 690 Lines • ▼ Show 20 Lines | atf_check -e empty \ | ||||
-o match:'\-rw\-r\-\-r\-\-[[:space:]]+1[[:space:]]+'"$nobody_uid[[:space:]]+$daemon_gid"'[[:space:]]+.+a\.file' \ | -o match:'\-rw\-r\-\-r\-\-[[:space:]]+1[[:space:]]+'"$nobody_uid[[:space:]]+$daemon_gid"'[[:space:]]+.+a\.file' \ | ||||
ls -ln a.file | ls -ln a.file | ||||
} | } | ||||
atf_test_case o_flag | atf_test_case o_flag | ||||
o_flag_head() | o_flag_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that the output from ls -o prints out the chflag values or '-' if none are set" | atf_set "descr" "Verify that the output from ls -O prints out the chflag values or '-' if none are set" | ||||
} | } | ||||
o_flag_body() | o_flag_body() | ||||
{ | { | ||||
local size=12345 | local size=12345 | ||||
create_test_dir | create_test_dir | ||||
atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=a.file \ | atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=a.file \ | ||||
bs=$size count=1 | bs=$size count=1 | ||||
atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \ | atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \ | ||||
bs=$size count=1 | bs=$size count=1 | ||||
atf_check -e empty -o empty -s exit:0 chflags uarch a.file | atf_check -e empty -o empty -s exit:0 chflags uarch a.file | ||||
atf_check -e empty -o empty -s exit:0 chflags 0 b.file | atf_check -e empty -o empty -s exit:0 chflags 0 b.file | ||||
atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \ | atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \ | ||||
-s exit:0 ls -lo a.file | -s exit:0 ls -lO a.file | ||||
atf_check -e empty -o match:"[[:space:]]+\\-[[:space:]]$size+.+b\\.file" \ | atf_check -e empty -o match:"[[:space:]]+\\-[[:space:]]$size+.+b\\.file" \ | ||||
-s exit:0 ls -lo b.file | -s exit:0 ls -lO b.file | ||||
} | } | ||||
atf_test_case p_flag | atf_test_case p_flag | ||||
p_flag_head() | p_flag_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that the output from ls -p prints out '/' after directories" | atf_set "descr" "Verify that the output from ls -p prints out '/' after directories" | ||||
} | } | ||||
▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines |