diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 60b56f0d9067..b9d1698d982e 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -228,13 +228,18 @@ label_body() -s exit:1 diff --label hello --label world `which diff` `which ls` } +report_identical_head() +{ + atf_set "require.config" unprivileged_user +} report_identical_body() { + UNPRIVILEGED_USER=$(atf_config_get unprivileged_user) printf "\tA\n" > A printf "\tB\n" > B chmod -r B atf_check -s exit:2 -e inline:"diff: B: Permission denied\n" \ - -o empty diff -s A B + -o empty su -m "$UNPRIVILEGED_USER" -c 'diff -s A B' } non_regular_file_body()