blob: 3f214e496e120c9d3c00c50c8ac67f76bf73f183 [file] [log] [blame]
Bram Moolenaar4a137b42017-08-04 22:37:11 +02001" Tests for saving/loading a file with some lines ending in
2" CTRL-M, some not
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +02003
Bram Moolenaar4a137b42017-08-04 22:37:11 +02004func Test_lineending()
5 let l = ["this line ends in a\<CR>",
6 \ "this one doesn't",
7 \ "this one does\<CR>",
8 \ "and the last one doesn't"]
9 set ta tx
10 enew!
11 call append(0, l)
12 $delete
13 write Xfile1
14 bwipe Xfile1
15 edit Xfile1
16 let t = getline(1, '$')
17 call assert_equal(l, t)
18 new | only
19 call delete('Xfile1')
20endfunc
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020021
22" vim: shiftwidth=2 sts=2 expandtab