14a137b45SBram Moolenaar" Tests for saving/loading a file with some lines ending in
24a137b45SBram Moolenaar" CTRL-M, some not
3*6d91bcb4SBram Moolenaar
44a137b45SBram Moolenaarfunc Test_lineending()
54a137b45SBram Moolenaar  let l = ["this line ends in a\<CR>",
64a137b45SBram Moolenaar	      \ "this one doesn't",
74a137b45SBram Moolenaar	      \ "this one does\<CR>",
84a137b45SBram Moolenaar	      \ "and the last one doesn't"]
94a137b45SBram Moolenaar  set ta tx
104a137b45SBram Moolenaar  enew!
114a137b45SBram Moolenaar  call append(0, l)
124a137b45SBram Moolenaar  $delete
134a137b45SBram Moolenaar  write Xfile1
144a137b45SBram Moolenaar  bwipe Xfile1
154a137b45SBram Moolenaar  edit Xfile1
164a137b45SBram Moolenaar  let t = getline(1, '$')
174a137b45SBram Moolenaar  call assert_equal(l, t)
184a137b45SBram Moolenaar  new | only
194a137b45SBram Moolenaar  call delete('Xfile1')
204a137b45SBram Moolenaarendfunc
21*6d91bcb4SBram Moolenaar
22*6d91bcb4SBram Moolenaar" vim: shiftwidth=2 sts=2 expandtab
23