From 87e0621857e9ebfe1509399fdbb9d71f7a4553ff Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 15 May 2015 19:03:45 +0200 Subject: [PATCH 1/3] tests: Migrate legacy test 30. The original test did also create additional auxiliary files which where never used. They are not created any longer. --- src/nvim/testdir/Makefile | 1 - src/nvim/testdir/test30.in | 230 ------------ src/nvim/testdir/test30.ok | 130 ------- .../legacy/030_fileformats_spec.lua | 336 ++++++++++++++++++ 4 files changed, 336 insertions(+), 361 deletions(-) delete mode 100644 src/nvim/testdir/test30.in delete mode 100644 src/nvim/testdir/test30.ok create mode 100644 test/functional/legacy/030_fileformats_spec.lua diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 2fba6dd563..88cdf19016 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -15,7 +15,6 @@ SCRIPTS := \ test14.out \ test17.out \ test24.out \ - test30.out \ test32.out \ test34.out \ test37.out \ diff --git a/src/nvim/testdir/test30.in b/src/nvim/testdir/test30.in deleted file mode 100644 index 56d5d5c6c2..0000000000 --- a/src/nvim/testdir/test30.in +++ /dev/null @@ -1,230 +0,0 @@ -Test for a lot of variations of the 'fileformats' option - -Note: This test will fail if "cat" is not available. - -STARTTEST -:" first write three test files, one in each format -:set fileformat=unix -:set fileformats= -:/^unix/;/eof/-1w! XXUnix -:/^dos/;/eof/-1w! XXDos -:set bin noeol -:$w! XXMac -Gonoeol -:$w! XXEol -:set nobin eol -:enew! -:bwipe XXUnix XXDos XXMac -:" create mixed format files -:if has("win32") -: !copy /b XXUnix+XXDos XXUxDs -: !copy /b XXUnix+XXMac XXUxMac -: !copy /b XXDos+XXMac XXDosMac -: !copy /b XXMac+XXEol XXMacEol -: !copy /b XXUnix+XXDos+XXMac XXUxDsMc -:else -: !cat XXUnix XXDos >XXUxDs -: !cat XXUnix XXMac >XXUxMac -: !cat XXDos XXMac >XXDosMac -: !cat XXMac XXEol >XXMacEol -: !cat XXUnix XXDos XXMac >XXUxDsMc -:endif -:" -:" try reading and writing with 'fileformats' empty -:set fileformat=unix -:e! XXUnix -:w! test.out -:e! XXDos -:w! XXtt01 -:e! XXMac -:w! XXtt02 -:bwipe XXUnix XXDos XXMac -:set fileformat=dos -:e! XXUnix -:w! XXtt11 -:e! XXDos -:w! XXtt12 -:e! XXMac -:w! XXtt13 -:bwipe XXUnix XXDos XXMac -:set fileformat=mac -:e! XXUnix -:w! XXtt21 -:e! XXDos -:w! XXtt22 -:e! XXMac -:w! XXtt23 -:bwipe XXUnix XXDos XXMac -:" -:" try reading and writing with 'fileformats' set to one format -:set fileformats=unix -:e! XXUxDsMc -:w! XXtt31 -:bwipe XXUxDsMc -:set fileformats=dos -:e! XXUxDsMc -:w! XXtt32 -:bwipe XXUxDsMc -:set fileformats=mac -:e! XXUxDsMc -:w! XXtt33 -:bwipe XXUxDsMc -:" -:" try reading and writing with 'fileformats' set to two formats -:set fileformats=unix,dos -:e! XXUxDsMc -:w! XXtt41 -:bwipe XXUxDsMc -:e! XXUxMac -:w! XXtt42 -:bwipe XXUxMac -:e! XXDosMac -:w! XXtt43 -:bwipe XXDosMac -:set fileformats=unix,mac -:e! XXUxDs -:w! XXtt51 -:bwipe XXUxDs -:e! XXUxDsMc -:w! XXtt52 -:bwipe XXUxDsMc -:e! XXDosMac -:w! XXtt53 -:bwipe XXDosMac -:e! XXEol -ggO=&ffs -:=&ff -:w! XXtt54 -:bwipe XXEol -:set fileformats=dos,mac -:e! XXUxDs -:w! XXtt61 -:bwipe XXUxDs -:e! XXUxMac -ggO=&ffs -:=&ff -:w! XXtt62 -:bwipe XXUxMac -:e! XXUxDsMc -:w! XXtt63 -:bwipe XXUxDsMc -:e! XXMacEol -ggO=&ffs -:=&ff -:w! XXtt64 -:bwipe XXMacEol -:" -:" try reading and writing with 'fileformats' set to three formats -:set fileformats=unix,dos,mac -:e! XXUxDsMc -:w! XXtt71 -:bwipe XXUxDsMc -:e! XXEol -ggO=&ffs -:=&ff -:w! XXtt72 -:bwipe XXEol -:set fileformats=mac,dos,unix -:e! XXUxDsMc -:w! XXtt81 -:bwipe XXUxDsMc -:e! XXEol -ggO=&ffs -:=&ff -:w! XXtt82 -:bwipe XXEol -:" try with 'binary' set -:set fileformats=mac,unix,dos -:set binary -:e! XXUxDsMc -:w! XXtt91 -:bwipe XXUxDsMc -:set fileformats=mac -:e! XXUxDsMc -:w! XXtt92 -:bwipe XXUxDsMc -:set fileformats=dos -:e! XXUxDsMc -:w! XXtt93 -:" -:" Append "END" to each file so that we can see what the last written char was. -:set fileformat=unix nobin -ggdGaEND:w >>XXtt01 -:w >>XXtt02 -:w >>XXtt11 -:w >>XXtt12 -:w >>XXtt13 -:w >>XXtt21 -:w >>XXtt22 -:w >>XXtt23 -:w >>XXtt31 -:w >>XXtt32 -:w >>XXtt33 -:w >>XXtt41 -:w >>XXtt42 -:w >>XXtt43 -:w >>XXtt51 -:w >>XXtt52 -:w >>XXtt53 -:w >>XXtt54 -:w >>XXtt61 -:w >>XXtt62 -:w >>XXtt63 -:w >>XXtt64 -:w >>XXtt71 -:w >>XXtt72 -:w >>XXtt81 -:w >>XXtt82 -:w >>XXtt91 -:w >>XXtt92 -:w >>XXtt93 -:" -:" Concatenate the results. -:" Make fileformat of test.out the native fileformat. -:" Add a newline at the end. -:set binary -:e! test.out -:$r XXtt01 -:$r XXtt02 -Go1:$r XXtt11 -:$r XXtt12 -:$r XXtt13 -Go2:$r XXtt21 -:$r XXtt22 -:$r XXtt23 -Go3:$r XXtt31 -:$r XXtt32 -:$r XXtt33 -Go4:$r XXtt41 -:$r XXtt42 -:$r XXtt43 -Go5:$r XXtt51 -:$r XXtt52 -:$r XXtt53 -:$r XXtt54 -Go6:$r XXtt61 -:$r XXtt62 -:$r XXtt63 -:$r XXtt64 -Go7:$r XXtt71 -:$r XXtt72 -Go8:$r XXtt81 -:$r XXtt82 -Go9:$r XXtt91 -:$r XXtt92 -:$r XXtt93 -Go10:$r XXUnix -:set nobinary ff& -:w -:qa! -ENDTEST - -unix -unix -eof - -dos -dos -eof - -mac mac diff --git a/src/nvim/testdir/test30.ok b/src/nvim/testdir/test30.ok deleted file mode 100644 index b35f4f5904..0000000000 --- a/src/nvim/testdir/test30.ok +++ /dev/null @@ -1,130 +0,0 @@ -unix -unix -dos -dos -END -mac mac -END -1 -unix -unix -END -dos -dos -END -mac mac -END -2 -unix -unix - END -dos -dos - END -mac mac END -3 -unix -unix -dos -dos -mac mac -END -unix -unix -dos -dos -mac mac -END -unix -unix -dos -dos -mac mac END -4 -unix -unix -dos -dos -mac mac -END -unix -unix -mac mac -END -dos -dos -mac mac -END -5 -unix -unix -dos -dos -END -unix -unix -dos -dos -mac mac -END -dos -dos -mac mac END -unix,mac:unix -noeol -END -6 -unix -unix -dos -dos -END -dos,mac:dos -unix -unix -mac mac -END -unix -unix -dos -dos -mac mac -END -dos,mac:mac mac mac noeol END -7 -unix -unix -dos -dos -mac mac -END -unix,dos,mac:unix -noeol -END -8 -unix -unix -dos -dos -mac mac -END -mac,dos,unix:mac noeol END -9 -unix -unix -dos -dos -mac mac END -unix -unix -dos -dos -mac mac END -unix -unix -dos -dos -mac mac END -10 -unix -unix diff --git a/test/functional/legacy/030_fileformats_spec.lua b/test/functional/legacy/030_fileformats_spec.lua new file mode 100644 index 0000000000..c1b1ef284f --- /dev/null +++ b/test/functional/legacy/030_fileformats_spec.lua @@ -0,0 +1,336 @@ +-- Test for a lot of variations of the 'fileformats' option + +local helpers = require('test.functional.helpers') +local feed, insert, source, clear, execute, expect, eq, eval, write_file = + helpers.feed, helpers.insert, helpers.source, helpers.clear, + helpers.execute, helpers.expect, helpers.eq, helpers.eval, + helpers.write_file + +describe('fileformats option', function() + setup(function() + clear() + local dos = 'dos\r\ndos\r\n' + local mac = 'mac\rmac\r' + local unix = 'unix\nunix\n' + write_file('XXDos', dos) + write_file('XXMac', mac) + write_file('XXUnix', unix) + write_file('XXDosMac', dos..mac) + write_file('XXUxDs', unix..dos) + write_file('XXUxDsMc', unix..dos..mac) + write_file('XXUxMac', unix..mac) + end) + teardown(function() + os.remove('test.out') + os.remove('XXDos') + os.remove('XXMac') + os.remove('XXUnix') + os.remove('XXDosMac') + os.remove('XXUxDs') + os.remove('XXUxDsMc') + os.remove('XXUxMac') + for i = 0, 9 do + for j = 1, 3 do + os.remove('XXtt'..i..j) + end + end + end) + + it('is working', function() + + -- Try reading and writing with 'fileformats' empty. + execute('set fileformats=') + execute('set fileformat=unix') + execute('e! XXUnix') + execute('w! test.out') + execute('e! XXDos') + execute('w! XXtt01') + execute('e! XXMac') + execute('w! XXtt02') + execute('bwipe XXUnix XXDos XXMac') + execute('set fileformat=dos') + execute('e! XXUnix') + execute('w! XXtt11') + execute('e! XXDos') + execute('w! XXtt12') + execute('e! XXMac') + execute('w! XXtt13') + execute('bwipe XXUnix XXDos XXMac') + execute('set fileformat=mac') + execute('e! XXUnix') + execute('w! XXtt21') + execute('e! XXDos') + execute('w! XXtt22') + execute('e! XXMac') + execute('w! XXtt23') + execute('bwipe XXUnix XXDos XXMac') + + -- Try reading and writing with 'fileformats' set to one format. + execute('set fileformats=unix') + execute('e! XXUxDsMc') + execute('w! XXtt31') + execute('bwipe XXUxDsMc') + execute('set fileformats=dos') + execute('e! XXUxDsMc') + execute('w! XXtt32') + execute('bwipe XXUxDsMc') + execute('set fileformats=mac') + execute('e! XXUxDsMc') + execute('w! XXtt33') + execute('bwipe XXUxDsMc') + + -- Try reading and writing with 'fileformats' set to two formats. + execute('set fileformats=unix,dos') + execute('e! XXUxDsMc') + execute('w! XXtt41') + execute('bwipe XXUxDsMc') + execute('e! XXUxMac') + execute('w! XXtt42') + execute('bwipe XXUxMac') + execute('e! XXDosMac') + execute('w! XXtt43') + execute('bwipe XXDosMac') + execute('set fileformats=unix,mac') + execute('e! XXUxDs') + execute('w! XXtt51') + execute('bwipe XXUxDs') + execute('e! XXUxDsMc') + execute('w! XXtt52') + execute('bwipe XXUxDsMc') + execute('e! XXDosMac') + execute('w! XXtt53') + execute('bwipe XXDosMac') + execute('set fileformats=dos,mac') + execute('e! XXUxDs') + execute('w! XXtt61') + execute('bwipe XXUxDs') + execute('e! XXUxMac') + execute('w! XXtt62') + execute('bwipe XXUxMac') + execute('e! XXUxDsMc') + execute('w! XXtt63') + execute('bwipe XXUxDsMc') + + -- Try reading and writing with 'fileformats' set to three formats. + execute('set fileformats=unix,dos,mac') + execute('e! XXUxDsMc') + execute('w! XXtt71') + execute('bwipe XXUxDsMc') + execute('set fileformats=mac,dos,unix') + execute('e! XXUxDsMc') + execute('w! XXtt81') + execute('bwipe XXUxDsMc') + -- Try with 'binary' set. + execute('set fileformats=mac,unix,dos') + execute('set binary') + execute('e! XXUxDsMc') + execute('w! XXtt91') + execute('bwipe XXUxDsMc') + execute('set fileformats=mac') + execute('e! XXUxDsMc') + execute('w! XXtt92') + execute('bwipe XXUxDsMc') + execute('set fileformats=dos') + execute('e! XXUxDsMc') + execute('w! XXtt93') + + -- Append "END" to each file so that we can see what the last written char was. + execute('set fileformat=unix nobin') + feed('ggdGaEND') + execute('w >>XXtt01') + execute('w >>XXtt02') + execute('w >>XXtt11') + execute('w >>XXtt12') + execute('w >>XXtt13') + execute('w >>XXtt21') + execute('w >>XXtt22') + execute('w >>XXtt23') + execute('w >>XXtt31') + execute('w >>XXtt32') + execute('w >>XXtt33') + execute('w >>XXtt41') + execute('w >>XXtt42') + execute('w >>XXtt43') + execute('w >>XXtt51') + execute('w >>XXtt52') + execute('w >>XXtt53') + execute('w >>XXtt61') + execute('w >>XXtt62') + execute('w >>XXtt63') + execute('w >>XXtt71') + execute('w >>XXtt81') + execute('w >>XXtt91') + execute('w >>XXtt92') + execute('w >>XXtt93') + + -- Concatenate the results. + -- Make fileformat of test.out the native fileformat. + -- Add a newline at the end. + execute('set binary') + execute('e! test.out') + execute('$r XXtt01') + execute('$r XXtt02') + feed('Go1') + execute('$r XXtt11') + execute('$r XXtt12') + execute('$r XXtt13') + feed('Go2') + execute('$r XXtt21') + execute('$r XXtt22') + execute('$r XXtt23') + feed('Go3') + execute('$r XXtt31') + execute('$r XXtt32') + execute('$r XXtt33') + feed('Go4') + execute('$r XXtt41') + execute('$r XXtt42') + execute('$r XXtt43') + feed('Go5') + execute('$r XXtt51') + execute('$r XXtt52') + execute('$r XXtt53') + feed('Go6') + execute('$r XXtt61') + execute('$r XXtt62') + execute('$r XXtt63') + feed('Go7') + execute('$r XXtt71') + feed('Go8') + execute('$r XXtt81') + feed('Go9') + execute('$r XXtt91') + execute('$r XXtt92') + execute('$r XXtt93') + feed('Go10') + execute('$r XXUnix') + execute('set nobinary ff&') + + -- Assert buffer contents. This has to be done manually as + -- helpers.expect() calls helpers.dedent() which messes up the white space + -- and carrige returns. + eq( + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'END\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + '1\n'.. + 'unix\r\n'.. + 'unix\r\n'.. + 'END\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'END\n'.. + 'mac\rmac\r\r\n'.. + 'END\n'.. + '2\n'.. + 'unix\n'.. + 'unix\n'.. + '\rEND\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + '\rEND\n'.. + 'mac\rmac\rEND\n'.. + '3\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + 'unix\r\n'.. + 'unix\r\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\r\n'.. + 'END\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\rEND\n'.. + '4\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + 'unix\n'.. + 'unix\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\r\n'.. + 'END\n'.. + '5\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'END\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\rEND\n'.. + '6\n'.. + 'unix\r\n'.. + 'unix\r\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'END\n'.. + 'unix\r\n'.. + 'unix\r\n'.. + 'mac\rmac\r\r\n'.. + 'END\n'.. + 'unix\r\n'.. + 'unix\r\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\r\n'.. + 'END\n'.. + '7\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + '8\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\r\n'.. + 'END\n'.. + '9\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\rEND\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\rEND\n'.. + 'unix\n'.. + 'unix\n'.. + 'dos\r\n'.. + 'dos\r\n'.. + 'mac\rmac\rEND\n'.. + '10\n'.. + 'unix\n'.. + 'unix', + helpers.curbuf_contents()) + end) +end) From 9b6988e62abbfb13746152c5d0cb4af78dbef5ce Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Feb 2016 09:15:00 +0100 Subject: [PATCH 2/3] tests: Update migrated legacy test 30 for patch 7.4.643. The patch was merged into master at f104ce2d. --- .../legacy/030_fileformats_spec.lua | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/test/functional/legacy/030_fileformats_spec.lua b/test/functional/legacy/030_fileformats_spec.lua index c1b1ef284f..705c0dd61f 100644 --- a/test/functional/legacy/030_fileformats_spec.lua +++ b/test/functional/legacy/030_fileformats_spec.lua @@ -12,10 +12,13 @@ describe('fileformats option', function() local dos = 'dos\r\ndos\r\n' local mac = 'mac\rmac\r' local unix = 'unix\nunix\n' + local eol = 'noeol' write_file('XXDos', dos) write_file('XXMac', mac) write_file('XXUnix', unix) + write_file('XXEol', eol) write_file('XXDosMac', dos..mac) + write_file('XXMacEol', mac..eol) write_file('XXUxDs', unix..dos) write_file('XXUxDsMc', unix..dos..mac) write_file('XXUxMac', unix..mac) @@ -25,12 +28,14 @@ describe('fileformats option', function() os.remove('XXDos') os.remove('XXMac') os.remove('XXUnix') + os.remove('XXEol') os.remove('XXDosMac') + os.remove('XXMacEol') os.remove('XXUxDs') os.remove('XXUxDsMc') os.remove('XXUxMac') for i = 0, 9 do - for j = 1, 3 do + for j = 1, 4 do os.remove('XXtt'..i..j) end end @@ -100,26 +105,43 @@ describe('fileformats option', function() execute('e! XXDosMac') execute('w! XXtt53') execute('bwipe XXDosMac') + execute('e! XXEol') + feed('ggO=&ffs:=&ff') + execute('w! XXtt54') + execute('bwipe XXEol') execute('set fileformats=dos,mac') execute('e! XXUxDs') execute('w! XXtt61') execute('bwipe XXUxDs') execute('e! XXUxMac') + feed('ggO=&ffs:=&ff') execute('w! XXtt62') execute('bwipe XXUxMac') execute('e! XXUxDsMc') execute('w! XXtt63') execute('bwipe XXUxDsMc') + execute('e! XXMacEol') + feed('ggO=&ffs:=&ff') + execute('w! XXtt64') + execute('bwipe XXMacEol') -- Try reading and writing with 'fileformats' set to three formats. execute('set fileformats=unix,dos,mac') execute('e! XXUxDsMc') execute('w! XXtt71') execute('bwipe XXUxDsMc') + execute('e! XXEol') + feed('ggO=&ffs:=&ff') + execute('w! XXtt72') + execute('bwipe XXEol') execute('set fileformats=mac,dos,unix') execute('e! XXUxDsMc') execute('w! XXtt81') execute('bwipe XXUxDsMc') + execute('e! XXEol') + feed('ggO=&ffs:=&ff') + execute('w! XXtt82') + execute('bwipe XXEol') -- Try with 'binary' set. execute('set fileformats=mac,unix,dos') execute('set binary') @@ -154,11 +176,15 @@ describe('fileformats option', function() execute('w >>XXtt51') execute('w >>XXtt52') execute('w >>XXtt53') + execute('w >>XXtt54') execute('w >>XXtt61') execute('w >>XXtt62') execute('w >>XXtt63') + execute('w >>XXtt64') execute('w >>XXtt71') + execute('w >>XXtt72') execute('w >>XXtt81') + execute('w >>XXtt82') execute('w >>XXtt91') execute('w >>XXtt92') execute('w >>XXtt93') @@ -190,14 +216,18 @@ describe('fileformats option', function() execute('$r XXtt51') execute('$r XXtt52') execute('$r XXtt53') + execute('$r XXtt54') feed('Go6') execute('$r XXtt61') execute('$r XXtt62') execute('$r XXtt63') + execute('$r XXtt64') feed('Go7') execute('$r XXtt71') + execute('$r XXtt72') feed('Go8') execute('$r XXtt81') + execute('$r XXtt82') feed('Go9') execute('$r XXtt91') execute('$r XXtt92') @@ -282,12 +312,16 @@ describe('fileformats option', function() 'dos\r\n'.. 'dos\r\n'.. 'mac\rmac\rEND\n'.. + 'unix,mac:unix\n'.. + 'noeol\n'.. + 'END\n'.. '6\n'.. 'unix\r\n'.. 'unix\r\n'.. 'dos\r\n'.. 'dos\r\n'.. 'END\n'.. + 'dos,mac:dos\r\n'.. 'unix\r\n'.. 'unix\r\n'.. 'mac\rmac\r\r\n'.. @@ -298,6 +332,7 @@ describe('fileformats option', function() 'dos\r\n'.. 'mac\rmac\r\r\n'.. 'END\n'.. + 'dos,mac:mac\rmac\rmac\rnoeol\rEND\n'.. '7\n'.. 'unix\n'.. 'unix\n'.. @@ -305,6 +340,9 @@ describe('fileformats option', function() 'dos\r\n'.. 'mac\rmac\r\n'.. 'END\n'.. + 'unix,dos,mac:unix\n'.. + 'noeol\n'.. + 'END\n'.. '8\n'.. 'unix\n'.. 'unix\n'.. @@ -312,6 +350,7 @@ describe('fileformats option', function() 'dos\r\n'.. 'mac\rmac\r\n'.. 'END\n'.. + 'mac,dos,unix:mac\rnoeol\rEND\n'.. '9\n'.. 'unix\n'.. 'unix\n'.. From 7a56967f8c1d09c1e07af97beec05d1d5e0480c9 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Thu, 28 Jul 2016 20:35:06 +0200 Subject: [PATCH 3/3] A bit of linting --- test/functional/legacy/030_fileformats_spec.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/legacy/030_fileformats_spec.lua b/test/functional/legacy/030_fileformats_spec.lua index 705c0dd61f..31b051a58d 100644 --- a/test/functional/legacy/030_fileformats_spec.lua +++ b/test/functional/legacy/030_fileformats_spec.lua @@ -1,10 +1,8 @@ -- Test for a lot of variations of the 'fileformats' option local helpers = require('test.functional.helpers') -local feed, insert, source, clear, execute, expect, eq, eval, write_file = - helpers.feed, helpers.insert, helpers.source, helpers.clear, - helpers.execute, helpers.expect, helpers.eq, helpers.eval, - helpers.write_file +local feed, clear, execute = helpers.feed, helpers.clear, helpers.execute +local eq, write_file = helpers.eq, helpers.write_file describe('fileformats option', function() setup(function() @@ -23,6 +21,7 @@ describe('fileformats option', function() write_file('XXUxDsMc', unix..dos..mac) write_file('XXUxMac', unix..mac) end) + teardown(function() os.remove('test.out') os.remove('XXDos') @@ -36,7 +35,7 @@ describe('fileformats option', function() os.remove('XXUxMac') for i = 0, 9 do for j = 1, 4 do - os.remove('XXtt'..i..j) + os.remove('XXtt'..i..j) end end end) @@ -156,7 +155,8 @@ describe('fileformats option', function() execute('e! XXUxDsMc') execute('w! XXtt93') - -- Append "END" to each file so that we can see what the last written char was. + -- Append "END" to each file so that we can see what the last written + -- char was. execute('set fileformat=unix nobin') feed('ggdGaEND') execute('w >>XXtt01')