aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
authorRainer Borene <rainerborene@gmail.com>2014-10-22 18:55:13 -0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-04 12:57:32 -0300
commitd4f92e521c1241f45f4e4db8cfab1471e2f26aeb (patch)
tree5c5d31804fe8c4cc37aa9c954f7976952b997d42 /test/functional/legacy
parentdbc7a8d987784bc66e082ee29d6ee64e44b972f7 (diff)
downloadrneovim-d4f92e521c1241f45f4e4db8cfab1471e2f26aeb.tar.gz
rneovim-d4f92e521c1241f45f4e4db8cfab1471e2f26aeb.tar.bz2
rneovim-d4f92e521c1241f45f4e4db8cfab1471e2f26aeb.zip
legacy tests: migrate test102
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/102_fnameescape_spec.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/legacy/102_fnameescape_spec.lua b/test/functional/legacy/102_fnameescape_spec.lua
new file mode 100644
index 0000000000..251ce68430
--- /dev/null
+++ b/test/functional/legacy/102_fnameescape_spec.lua
@@ -0,0 +1,26 @@
+-- Test if fnameescape is correct for special chars like!
+
+local helpers = require('test.functional.helpers')
+local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
+local execute, expect = helpers.execute, helpers.expect
+
+describe('fnameescape', function()
+ setup(clear)
+
+ it('is working', function()
+ execute('let fname = "Xspa ce"')
+ execute('try', 'exe "w! " . fnameescape(fname)', "put='Space'", 'endtry')
+ execute('let fname = "Xemark!"')
+ execute('try', 'exe "w! " . fnameescape(fname)', "put='ExclamationMark'", 'endtry')
+
+ expect([[
+
+ Space
+ ExclamationMark]])
+ end)
+
+ teardown(function()
+ os.remove("Xspa ce")
+ os.remove("Xemark!")
+ end)
+end)