diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2017-06-06 21:03:43 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2017-06-06 21:03:43 +0000 |
commit | 9086e0e06819bdf7290dc15cc04985fe8e66a711 (patch) | |
tree | b01e9b5a9d323352478dda1edf14db84a2227f8d /contrib/netbsd-tests | |
parent | 761097c85e52c158a759701021493f8b0f82fbc9 (diff) | |
download | src-9086e0e06819bdf7290dc15cc04985fe8e66a711.tar.gz src-9086e0e06819bdf7290dc15cc04985fe8e66a711.zip |
Notes
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_s_output.in | 6 | ||||
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_s_output.out | 5 | ||||
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_vt_output.in | 3 | ||||
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_vt_output.out | 3 | ||||
-rwxr-xr-x | contrib/netbsd-tests/bin/cat/t_cat.sh | 41 |
5 files changed, 58 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/bin/cat/d_s_output.in b/contrib/netbsd-tests/bin/cat/d_s_output.in new file mode 100644 index 000000000000..44f91aac1ba1 --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_s_output.in @@ -0,0 +1,6 @@ +a b c + + +1 2 3 + +x y z diff --git a/contrib/netbsd-tests/bin/cat/d_s_output.out b/contrib/netbsd-tests/bin/cat/d_s_output.out new file mode 100644 index 000000000000..37d30c7e0113 --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_s_output.out @@ -0,0 +1,5 @@ +a b c + +1 2 3 + +x y z diff --git a/contrib/netbsd-tests/bin/cat/d_vt_output.in b/contrib/netbsd-tests/bin/cat/d_vt_output.in new file mode 100644 index 000000000000..0a74b4da7358 --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_vt_output.in @@ -0,0 +1,3 @@ + +<BS> +á diff --git a/contrib/netbsd-tests/bin/cat/d_vt_output.out b/contrib/netbsd-tests/bin/cat/d_vt_output.out new file mode 100644 index 000000000000..e98cea95a3a1 --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_vt_output.out @@ -0,0 +1,3 @@ +^I +^X<BS> +M-a diff --git a/contrib/netbsd-tests/bin/cat/t_cat.sh b/contrib/netbsd-tests/bin/cat/t_cat.sh index 799a7485b080..9ee053e026e7 100755 --- a/contrib/netbsd-tests/bin/cat/t_cat.sh +++ b/contrib/netbsd-tests/bin/cat/t_cat.sh @@ -63,9 +63,50 @@ se_output_body() { -x "cat -se $(atf_get_srcdir)/d_se_output.in" } +# Begin FreeBSD +atf_test_case s_output +s_output_head() { + atf_set "descr" "Test that cat(1) squeezes multiple adjacent " \ + "empty lines producing a single spaced output with option '-s'" +} + +s_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_s_output.out \ + cat -s $(atf_get_srcdir)/d_s_output.in +} + +atf_test_case e_output +e_output_head() { + atf_set "descr" "Test that cat(1) prints a $ sign " \ + "on blank lines with option '-e'" +} + +e_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_se_output.out \ + cat -e $(atf_get_srcdir)/d_se_output.in +} + +atf_test_case vt_output +vt_output_head() { + atf_set "descr" "Test that cat(1) displays non-printing characters, " \ + "namely control characters, tab character and meta-characters " \ + "using options '-vt'" +} + +vt_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_vt_output.out \ + cat -vt $(atf_get_srcdir)/d_vt_output.in +} +# End FreeBSD + atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent atf_add_test_case se_output +# Begin FreeBSD + atf_add_test_case s_output + atf_add_test_case e_output + atf_add_test_case vt_output +# End FreeBSD } |