diff options
author | ngie <ngie@FreeBSD.org> | 2017-07-06 05:26:27 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-07-06 05:26:27 +0000 |
commit | 3a3c297e646616a7661665613681d7b6a0cfd4bd (patch) | |
tree | f23882f4c00473106475f540dcd03c2e946a2057 /contrib/netbsd-tests | |
parent | aeeccd78072e76a46fa2290f9507ce05177d2de7 (diff) | |
download | FreeBSD-src-3a3c297e646616a7661665613681d7b6a0cfd4bd.zip FreeBSD-src-3a3c297e646616a7661665613681d7b6a0cfd4bd.tar.gz |
MFC r319637:
Add testcases for `cat -b`
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_b_output.in | 4 | ||||
-rw-r--r-- | contrib/netbsd-tests/bin/cat/d_b_output.out | 4 | ||||
-rwxr-xr-x | contrib/netbsd-tests/bin/cat/t_cat.sh | 16 |
3 files changed, 24 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/bin/cat/d_b_output.in b/contrib/netbsd-tests/bin/cat/d_b_output.in new file mode 100644 index 0000000..921e954 --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_b_output.in @@ -0,0 +1,4 @@ +This is a line + +The line before this was a blank line. + This line has leading whitespace. diff --git a/contrib/netbsd-tests/bin/cat/d_b_output.out b/contrib/netbsd-tests/bin/cat/d_b_output.out new file mode 100644 index 0000000..fef6d8f --- /dev/null +++ b/contrib/netbsd-tests/bin/cat/d_b_output.out @@ -0,0 +1,4 @@ + 1 This is a line + + 2 The line before this was a blank line. + 3 This line has leading whitespace. diff --git a/contrib/netbsd-tests/bin/cat/t_cat.sh b/contrib/netbsd-tests/bin/cat/t_cat.sh index 9ee053e..1070637 100755 --- a/contrib/netbsd-tests/bin/cat/t_cat.sh +++ b/contrib/netbsd-tests/bin/cat/t_cat.sh @@ -52,6 +52,19 @@ nonexistent_body() { -x "cat /some/name/that/does/not/exist" } +# Begin FreeBSD +atf_test_case b_output +b_output_head() { + atf_set "descr" "Test that cat(1) prints out numbers on non-blank "\ + "lines with '-b'" +} + +b_output_body() { + atf_check -o file:$(atf_get_srcdir)/d_b_output.out \ + cat -b $(atf_get_srcdir)/d_b_output.in +} +# End FreeBSD + atf_test_case se_output se_output_head() { atf_set "descr" "Test that cat(1) prints a $ sign " \ @@ -103,6 +116,9 @@ atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent +# Begin FreeBSD + atf_add_test_case b_output +# End FreeBSD atf_add_test_case se_output # Begin FreeBSD atf_add_test_case s_output |