aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_functions.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r--src/nvim/testdir/test_functions.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index b1f617ceda..555c4f58b7 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1887,6 +1887,13 @@ func Test_bufadd_bufload()
call bufload(buf)
call assert_equal([''], getbufline(buf, 1, '$'))
+ " when 'buftype' is "acwrite" then bufload() DOES read the file
+ bwipe! XotherName
+ let buf = bufadd('XotherName')
+ call setbufvar(buf, '&bt', 'acwrite')
+ call bufload(buf)
+ call assert_equal(['some', 'text'], getbufline(buf, 1, '$'))
+
bwipe someName
bwipe XotherName
call assert_equal(0, bufexists('someName'))