comparison src/testdir/test_startup.vim @ 28435:0533e7466ef0 v8.2.4742

patch 8.2.4742: there is no way to start logging very early in startup Commit: https://github.com/vim/vim/commit/c9a9a0ac1ec3b985d38c01ddf9f0ba2f15386f34 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 12 15:09:23 2022 +0100 patch 8.2.4742: there is no way to start logging very early in startup Problem: There is no way to start logging very early in startup. Solution: Add the --log argument. Include the date in the start message in the log file. Avoid a duplicate message when forking. Log an executed shell command.
author Bram Moolenaar <Bram@vim.org>
date Tue, 12 Apr 2022 16:15:03 +0200
parents 9849df834f1d
children 5f314b2ed494
comparison
equal deleted inserted replaced
28434:dfef2e002d5b 28435:0533e7466ef0
724 call assert_equal(expected, found) 724 call assert_equal(expected, found)
725 endif 725 endif
726 call delete('Xtestout') 726 call delete('Xtestout')
727 endfunc 727 endfunc
728 728
729 func Test_log()
730 CheckFeature channel
731
732 call assert_false(filereadable('Xlogfile'))
733 let after = ['qall']
734 if RunVim([], after, '--log Xlogfile')
735 call assert_equal(1, readfile('Xlogfile')
736 \ ->filter({i, l -> l =~ '==== start log session'})
737 \ ->len())
738 " second time appends to the log
739 if RunVim([], after, '--log Xlogfile')
740 call assert_equal(2, readfile('Xlogfile')
741 \ ->filter({i, l -> l =~ '==== start log session'})
742 \ ->len())
743 endif
744 endif
745 call delete('Xlogfile')
746 endfunc
747
729 func Test_read_stdin() 748 func Test_read_stdin()
730 let after =<< trim [CODE] 749 let after =<< trim [CODE]
731 write Xtestout 750 write Xtestout
732 quit! 751 quit!
733 [CODE] 752 [CODE]