patch 9.0.0803: readblob() cannot read from character device
Problem: readblob() cannot read from character device.
Solution: Use S_ISCHR() to not check the size. (Ken Takata, closes #11407)
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim
index a54cede..47315ab 100644
--- a/src/testdir/test_blob.vim
+++ b/src/testdir/test_blob.vim
@@ -508,6 +508,11 @@
END
call v9.CheckLegacyAndVim9Success(lines)
+ if filereadable('/dev/random')
+ let b = readblob('/dev/random', 0, 10)
+ call assert_equal(10, len(b))
+ endif
+
call assert_fails("call readblob('notexist')", 'E484:')
" TODO: How do we test for the E485 error?