Module Name: src Committed By: rillig Date: Fri Apr 26 00:57:15 UTC 2024
Modified Files: src/tests/bin/cat: t_cat.sh Log Message: tests/cat: clean up Multiple arguments to atf_set are joined by spaces, there's no need for an extra space. The exit status on success must be 0, so don't ignore it. Remove the unnecessary shell wrapper, as no redirection is going on. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/bin/cat/t_cat.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/bin/cat/t_cat.sh diff -u src/tests/bin/cat/t_cat.sh:1.3 src/tests/bin/cat/t_cat.sh:1.4 --- src/tests/bin/cat/t_cat.sh:1.3 Thu Jun 16 01:04:58 2016 +++ src/tests/bin/cat/t_cat.sh Fri Apr 26 00:57:15 2024 @@ -1,4 +1,4 @@ -# $NetBSD: t_cat.sh,v 1.3 2016/06/16 01:04:58 sevan Exp $ +# $NetBSD: t_cat.sh,v 1.4 2024/04/26 00:57:15 rillig Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,37 +30,37 @@ atf_test_case align align_head() { - atf_set "descr" "Test that cat(1) aligns the output " \ + atf_set "descr" "Test that cat(1) aligns the output" \ "right with options '-be' (PR bin/4841)" } align_body() { - atf_check -s ignore -o file:$(atf_get_srcdir)/d_align.out \ - -x "cat -be $(atf_get_srcdir)/d_align.in" + atf_check -o file:$(atf_get_srcdir)/d_align.out \ + cat -be $(atf_get_srcdir)/d_align.in } atf_test_case nonexistent nonexistent_head() { - atf_set "descr" "Test that cat(1) doesn't return zero exit " \ + atf_set "descr" "Test that cat(1) doesn't return zero exit" \ "status for a nonexistent file (PR bin/3538)" } nonexistent_body() { - atf_check -s not-exit:0 -o empty -e not-empty \ - -x "cat /some/name/that/does/not/exist" + atf_check -s not-exit:0 -e not-empty \ + cat /some/name/that/does/not/exist } atf_test_case se_output se_output_head() { - atf_set "descr" "Test that cat(1) prints a $ sign " \ + atf_set "descr" "Test that cat(1) prints a $ sign" \ "on blank lines with options '-se' (PR bin/51250)" } se_output_body() { - atf_check -s ignore -o file:$(atf_get_srcdir)/d_se_output.out \ - -x "cat -se $(atf_get_srcdir)/d_se_output.in" + atf_check -o file:$(atf_get_srcdir)/d_se_output.out \ + cat -se $(atf_get_srcdir)/d_se_output.in } atf_init_test_cases()