Mercurial > vim
comparison src/testdir/test_channel.vim @ 31849:dbec60b8c253 v9.0.1257
patch 9.0.1257: code style is not check in test scripts
Commit: https://github.com/vim/vim/commit/94722c510745a0cfd494c51625a514b92dd2bfb2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 28 19:19:03 2023 +0000
patch 9.0.1257: code style is not check in test scripts
Problem: Code style is not check in test scripts.
Solution: Add basic code style check for test files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 28 Jan 2023 20:30:04 +0100 |
parents | 16fc80710970 |
children | 10a03ae8ba60 |
comparison
equal
deleted
inserted
replaced
31848:b83cac410fcf | 31849:dbec60b8c253 |
---|---|
18 " src/testdir/channellog. | 18 " src/testdir/channellog. |
19 " Add ch_log() calls where you want to see what happens. | 19 " Add ch_log() calls where you want to see what happens. |
20 " call ch_logfile('channellog', 'w') | 20 " call ch_logfile('channellog', 'w') |
21 | 21 |
22 func SetUp() | 22 func SetUp() |
23 if g:testfunc =~ '_ipv6()$' | 23 if g:testfunc =~ '_ipv6()$' |
24 let s:localhost = '[::1]:' | 24 let s:localhost = '[::1]:' |
25 let s:testscript = 'test_channel_6.py' | 25 let s:testscript = 'test_channel_6.py' |
26 elseif g:testfunc =~ '_unix()$' | 26 elseif g:testfunc =~ '_unix()$' |
27 let s:localhost = 'unix:Xtestsocket' | 27 let s:localhost = 'unix:Xtestsocket' |
28 let s:testscript = 'test_channel_unix.py' | 28 let s:testscript = 'test_channel_unix.py' |
1218 endfunc | 1218 endfunc |
1219 | 1219 |
1220 func Test_pipe_to_buffer_raw() | 1220 func Test_pipe_to_buffer_raw() |
1221 let options = {'out_mode': 'raw', 'out_io': 'buffer', 'out_name': 'testout'} | 1221 let options = {'out_mode': 'raw', 'out_io': 'buffer', 'out_name': 'testout'} |
1222 split testout | 1222 split testout |
1223 let job = job_start([s:python, '-c', | 1223 let job = job_start([s:python, '-c', |
1224 \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options) | 1224 \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options) |
1225 " the job may be done quickly, also accept "dead" | 1225 " the job may be done quickly, also accept "dead" |
1226 call assert_match('^\%(dead\|run\)$', job_status(job)) | 1226 call assert_match('^\%(dead\|run\)$', job_status(job)) |
1227 call WaitFor('len(join(getline(1, "$"), "")) >= 10000') | 1227 call WaitFor('len(join(getline(1, "$"), "")) >= 10000') |
1228 try | 1228 try |