patch 8.2.0521: crash when reading a blob fails
Problem: Crash when reading a blob fails.
Solution: Avoid keeping a pointer to a freed blob object. (Dominique Pelle,
closes #5890) Adjust error messages.
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim
index 2e5ef0b..0170f54 100644
--- a/src/testdir/test_blob.vim
+++ b/src/testdir/test_blob.vim
@@ -257,6 +257,9 @@
let br = readfile('Xblob', 'B')
call assert_equal(b, br)
call delete('Xblob')
+
+ " This was crashing when calling readfile() with a directory.
+ call assert_fails("call readfile('.', 'B')", 'E17: "." is a directory')
endfunc
" filter() item in blob