neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

test_lineending.vim (438B)


      1 " Tests for saving/loading a file with some lines ending in
      2 " CTRL-M, some not
      3 func Test_lineending()
      4  let l = ["this line ends in a\<CR>",
      5       \ "this one doesn't",
      6       \ "this one does\<CR>",
      7       \ "and the last one doesn't"]
      8  set fileformat=dos
      9  enew!
     10  call append(0, l)
     11  $delete
     12  write Xfile1
     13  bwipe Xfile1
     14  edit Xfile1
     15  let t = getline(1, '$')
     16  call assert_equal(l, t)
     17  new | only
     18  call delete('Xfile1')
     19 endfunc