comparison src/testdir/test_eval_stuff.vim @ 15468:1550cc188ff6 v8.1.0742

patch 8.1.0742: not all Blob operations are tested commit https://github.com/vim/vim/commit/05500ece6282407f9f7227aaf564e24147326863 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 13 19:10:33 2019 +0100 patch 8.1.0742: not all Blob operations are tested Problem: Not all Blob operations are tested. Solution: Add more testing for Blob.
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Jan 2019 19:15:06 +0100
parents f01eb1aed348
children e26caeb30026
comparison
equal deleted inserted replaced
15467:6bfdffc67a8e 15468:1550cc188ff6
67 func Test_for_invalid() 67 func Test_for_invalid()
68 call assert_fails("for x in 99", 'E714:') 68 call assert_fails("for x in 99", 'E714:')
69 call assert_fails("for x in 'asdf'", 'E714:') 69 call assert_fails("for x in 'asdf'", 'E714:')
70 call assert_fails("for x in {'a': 9}", 'E714:') 70 call assert_fails("for x in {'a': 9}", 'E714:')
71 endfunc 71 endfunc
72
73 func Test_readfile_binary()
74 new
75 call setline(1, ['one', 'two', 'three'])
76 setlocal ff=dos
77 write XReadfile
78 let lines = readfile('XReadfile')
79 call assert_equal(['one', 'two', 'three'], lines)
80 let lines = readfile('XReadfile', '', 2)
81 call assert_equal(['one', 'two'], lines)
82 let lines = readfile('XReadfile', 'b')
83 call assert_equal(["one\r", "two\r", "three\r", ""], lines)
84 let lines = readfile('XReadfile', 'b', 2)
85 call assert_equal(["one\r", "two\r"], lines)
86
87 bwipe!
88 call delete('XReadfile')
89 endfunc