From 0082cd313485aa60811b1bdbe3c765f107ba1ba9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 15 Mar 2026 06:29:12 +0800 Subject: [PATCH] vim-patch:9.2.0165: tests: perleval fails in the sandbox Problem: tests: perleval fails in the sandbox (after v9.2.0156) Solution: Update tests and assert that it fails related: vim/vim#19676 https://github.com/vim/vim/commit/3f89324b3a7a7c88be19136227fbc9e1137cdb69 Co-authored-by: Christian Brabandt --- test/old/testdir/test_perl.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/old/testdir/test_perl.vim b/test/old/testdir/test_perl.vim index 2d7f8fdc10..275ec4c483 100644 --- a/test/old/testdir/test_perl.vim +++ b/test/old/testdir/test_perl.vim @@ -156,13 +156,13 @@ func Test_perleval() call assert_equal(0, perleval('0')) call assert_equal(2, perleval('2')) call assert_equal(-2, perleval('-2')) - if has('float') - call assert_equal(2.5, perleval('2.5')) - else - call assert_equal(2, perleval('2.5')) - end + call assert_equal(2.5, perleval('2.5')) - " sandbox call assert_equal(2, perleval('2')) + try + sandbox call perleval('2') + call assert_report('perleval did not fail in the sandbox') + catch /^Vim\%((\S\+)\)\=:E48:/ + endtry call assert_equal('abc', perleval('"abc"')) " call assert_equal("abc\ndef", perleval('"abc\0def"'))