Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102943779
D39116.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
737 B
Referenced Files
None
Subscribers
None
D39116.diff
View Options
diff --git a/usr.bin/tail/tests/tail_test.sh b/usr.bin/tail/tests/tail_test.sh
--- a/usr.bin/tail/tests/tail_test.sh
+++ b/usr.bin/tail/tests/tail_test.sh
@@ -392,6 +392,19 @@
atf_check cmp outfile expectfile
}
+atf_test_case no_lf_at_eof
+no_lf_at_eof_head()
+{
+ atf_set "descr" "File does not end in newline"
+}
+no_lf_at_eof_body()
+{
+ printf "a\nb\nc" >infile
+ atf_check -o inline:"c" tail -1 infile
+ atf_check -o inline:"b\nc" tail -2 infile
+ atf_check -o inline:"a\nb\nc" tail -3 infile
+ atf_check -o inline:"a\nb\nc" tail -4 infile
+}
atf_init_test_cases()
{
@@ -416,4 +429,5 @@
atf_add_test_case silent_header
atf_add_test_case verbose_header
atf_add_test_case si_number
+ atf_add_test_case no_lf_at_eof
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 1:32 AM (22 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14727207
Default Alt Text
D39116.diff (737 B)
Attached To
Mode
D39116: tail: Verify correct behavior when input does not end in a newline.
Attached
Detach File
Event Timeline
Log In to Comment