diff src/testdir/test_assert.vim @ 17825:ce993ba17adb v8.1.1909

patch 8.1.1909: more functions can be used as methods Commit: https://github.com/vim/vim/commit/e49fbff384e45dd17fed72321c26937edf6de16b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 21 22:50:07 2019 +0200 patch 8.1.1909: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Aug 2019 23:00:04 +0200
parents 68ea27d26d5b
children 8a2fb21c23c0
line wrap: on
line diff
--- a/src/testdir/test_assert.vim
+++ b/src/testdir/test_assert.vim
@@ -54,7 +54,7 @@ func Test_assert_equalfile()
 
   let goodtext = ["one", "two", "three"]
   call writefile(goodtext, 'Xone')
-  call assert_equal(1, assert_equalfile('Xone', 'xyzxyz'))
+  call assert_equal(1, 'Xone'->assert_equalfile('xyzxyz'))
   call assert_match("E485: Can't read file xyzxyz", v:errors[0])
   call remove(v:errors, 0)
 
@@ -97,6 +97,9 @@ func Test_assert_report()
   call assert_equal(1, assert_report('something is wrong'))
   call assert_match('something is wrong', v:errors[0])
   call remove(v:errors, 0)
+  call assert_equal(1, 'also wrong'->assert_report())
+  call assert_match('also wrong', v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_assert_exception()