diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-12 15:09:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-12 15:09:23 +0100 |
commit | c9a9a0ac1ec3b985d38c01ddf9f0ba2f15386f34 (patch) | |
tree | fb5fdcc958f7d680b56c8a096f033afd5874fef7 /src/testdir | |
parent | 60895f3e36def9beb7d5463e792e5154ad9a7a0a (diff) |
patch 8.2.4742: there is no way to start logging very early in startupv8.2.4742
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.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_startup.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 6926ba313e..c580dd0e49 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -726,6 +726,25 @@ func Test_startuptime() call delete('Xtestout') endfunc +func Test_log() + CheckFeature channel + + call assert_false(filereadable('Xlogfile')) + let after = ['qall'] + if RunVim([], after, '--log Xlogfile') + call assert_equal(1, readfile('Xlogfile') + \ ->filter({i, l -> l =~ '==== start log session'}) + \ ->len()) + " second time appends to the log + if RunVim([], after, '--log Xlogfile') + call assert_equal(2, readfile('Xlogfile') + \ ->filter({i, l -> l =~ '==== start log session'}) + \ ->len()) + endif + endif + call delete('Xlogfile') +endfunc + func Test_read_stdin() let after =<< trim [CODE] write Xtestout |