diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 06d914215b11..6073feebf5fb 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -408,7 +408,8 @@ diffreg_stone(char *file1, char *file2, int flags, int capsicum) } if (diff_format == D_BRIEF && ignore_pats == NULL && - (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_STRIPCR)) == 0) + (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE| + D_SKIPBLANKLINES|D_STRIPCR)) == 0) { rval = D_DIFFER; status |= 1; diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 146c23fa303d..9a17d180da02 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -11,6 +11,7 @@ atf_test_case brief_format atf_test_case b230049 atf_test_case stripcr_o atf_test_case b252515 +atf_test_case b278988 atf_test_case Bflag atf_test_case Nflag atf_test_case tabsize @@ -89,6 +90,15 @@ b252515_body() diff -qw b252515_a.in b252515_b.in } +b278988_body() +{ + printf 'a\nb\nn' > b278988.a.in + printf 'a\n\nb\nn' > b278988.b.in + atf_check -o empty -s eq:0 \ + diff -Bw b278988.a.in b278988.b.in + +} + header_body() { export TZ=UTC @@ -369,6 +379,7 @@ atf_init_test_cases() atf_add_test_case b230049 atf_add_test_case stripcr_o atf_add_test_case b252515 + atf_add_test_case b278988 atf_add_test_case Bflag atf_add_test_case Nflag atf_add_test_case tabsize