From af23d173883f47fd02a9a380c719e4428370b484 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:13:04 +0100 Subject: test: move oldtests to test directory (#22536) The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'. --- test/old/testdir/test_fnameescape.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/old/testdir/test_fnameescape.vim (limited to 'test/old/testdir/test_fnameescape.vim') diff --git a/test/old/testdir/test_fnameescape.vim b/test/old/testdir/test_fnameescape.vim new file mode 100644 index 0000000000..cdb96ba5ff --- /dev/null +++ b/test/old/testdir/test_fnameescape.vim @@ -0,0 +1,27 @@ + +" Test if fnameescape is correct for special chars like ! +func Test_fnameescape() + let fname = 'Xspa ce' + let status = v:false + try + exe "w! " . fnameescape(fname) + let status = v:true + endtry + call assert_true(status, "Space") + call delete(fname) + + let fname = 'Xemark!' + let status = v:false + try + exe "w! " . fname->fnameescape() + let status = v:true + endtry + call assert_true(status, "ExclamationMark") + call delete(fname) + + call assert_equal('\-', fnameescape('-')) + call assert_equal('\+', fnameescape('+')) + call assert_equal('\>', fnameescape('>')) +endfunc + +" vim: shiftwidth=2 sts=2 expandtab -- cgit