summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-08 16:39:22 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-08 16:39:22 +0100
commit45bbaef0382c5468d9fac511775bd99ea7bf5b84 (patch)
treeabd7687d97b0d9abe4d39d5386245dc521bad206 /src/testdir/test_channel.vim
parent2a4c885d54171f68ec2c2d6eb4ae281c7fefb802 (diff)
patch 9.0.0418: manually deleting temp test filesv9.0.0418
Problem: Manually deleting temp test files. Solution: Use the 'D' flag of writefile() and mkdir().
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 6b595d0a33..930868f511 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -714,7 +714,7 @@ func Stop_g_job()
endfunc
func Test_nl_read_file()
- call writefile(['echo something', 'echoerr wrong', 'double this'], 'Xinput')
+ call writefile(['echo something', 'echoerr wrong', 'double this'], 'Xinput', 'D')
let g:job = job_start(s:python . " test_channel_pipe.py",
\ {'in_io': 'file', 'in_name': 'Xinput'})
call assert_equal("run", job_status(g:job))
@@ -726,7 +726,6 @@ func Test_nl_read_file()
call assert_equal("AND this", ch_readraw(handle))
finally
call Stop_g_job()
- call delete('Xinput')
endtry
call assert_fails("echo ch_read(test_null_channel(), {'callback' : 'abc'})", 'E475:')
endfunc
@@ -1161,14 +1160,13 @@ func Test_write_to_buffer_and_scroll()
endif
call job_start(cmd, #{out_io: 'buffer', out_name: 'Xscrollbuffer'})
END
- call writefile(lines, 'XtestBufferScroll')
+ call writefile(lines, 'XtestBufferScroll', 'D')
let buf = RunVimInTerminal('-S XtestBufferScroll', #{rows: 10})
call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_job_buffer_scroll_1', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestBufferScroll')
endfunc
func Test_pipe_null()
@@ -2178,7 +2176,7 @@ endfunc
func Test_job_tty_in_out()
CheckUnix
- call writefile(['test'], 'Xtestin')
+ call writefile(['test'], 'Xtestin', 'D')
let in_opts = [{},
\ {'in_io': 'null'},
\ {'in_io': 'file', 'in_name': 'Xtestin'}]
@@ -2220,7 +2218,6 @@ func Test_job_tty_in_out()
call WaitForAssert({-> assert_equal('dead', job_status(job))})
endfor
- call delete('Xtestin')
call delete('Xtestout')
call delete('Xtesterr')
endfunc
@@ -2281,9 +2278,9 @@ func Test_zz_ch_log()
let text = readfile('Xlog')
call assert_match("hello there", text[1])
call assert_match("%s%s", text[2])
- call mkdir("Xchlogdir1")
+ call mkdir("Xchlogdir1", 'D')
call assert_fails("call ch_logfile('Xchlogdir1')", 'E484:')
- cal delete("Xchlogdir1", 'd')
+
call delete('Xlog')
endfunc