aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/testdir/test41.in24
-rw-r--r--src/nvim/testdir/test41.ok3
-rw-r--r--test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua40
3 files changed, 40 insertions, 27 deletions
diff --git a/src/nvim/testdir/test41.in b/src/nvim/testdir/test41.in
deleted file mode 100644
index 2d294cae09..0000000000
--- a/src/nvim/testdir/test41.in
+++ /dev/null
@@ -1,24 +0,0 @@
-Test for writing and reading a file of over 100 Kbyte
-
-1 line: "This is the start"
-3001 lines: "This is the leader"
-1 line: "This is the middle"
-3001 lines: "This is the trailer"
-1 line: "This is the end"
-
-STARTTEST
-:%d
-aThis is the start
-This is the leader
-This is the middle
-This is the trailer
-This is the endkY3000p2GY3000p
-:w! Xtest
-:%d
-:e! Xtest
-:.w! test.out
-3003G:.w >>test.out
-6005G:.w >>test.out
-:qa!
-ENDTEST
-
diff --git a/src/nvim/testdir/test41.ok b/src/nvim/testdir/test41.ok
deleted file mode 100644
index 988e5f24b4..0000000000
--- a/src/nvim/testdir/test41.ok
+++ /dev/null
@@ -1,3 +0,0 @@
-This is the start
-This is the middle
-This is the end
diff --git a/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua b/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua
new file mode 100644
index 0000000000..ed1a914c0f
--- /dev/null
+++ b/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua
@@ -0,0 +1,40 @@
+-- Test for writing and reading a file of over 100 Kbyte
+
+local helpers = require('test.functional.helpers')
+local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
+local execute, expect = helpers.execute, helpers.expect
+
+describe('writing and reading a file of over 100 Kbyte', function()
+ setup(clear)
+
+ it('is working', function()
+ insert([[
+ This is the start
+ This is the leader
+ This is the middle
+ This is the trailer
+ This is the end]])
+
+ feed('kY3000p2GY3000p')
+
+ execute('w! test.out')
+ execute('%d')
+ execute('e! test.out')
+ execute('yank A')
+ execute('3003yank A')
+ execute('6005yank A')
+ execute('%d')
+ execute('0put a')
+ execute('1d | $d')
+ execute('w!')
+
+ expect([[
+ This is the start
+ This is the middle
+ This is the end]])
+ end)
+
+ teardown(function()
+ os.remove('test.out')
+ end)
+end)