@@ -9,34 +9,18 @@ function! s:suite.before_each() abort
9
9
\ " v:val.client" )
10
10
endfunction
11
11
12
- function ! s: suite .get_script_host_client_info () abort
13
- let client_info = s: client_chans [1 ]
14
-
15
- call s: expect (sort (keys (client_info))).to_equal (
16
- \ [" attributes" , " methods" , " name" , " type" , " version" ])
17
-
18
- call s: expect (client_info.attributes).to_be_dict ()
19
- call s: expect (client_info.methods).to_equal ({" specs" : {" nargs" : 1 }, " poll" : {}})
20
- call s: expect (client_info.name).to_equal (" ruby-script-host" )
21
- call s: expect (client_info.type ).to_equal (" host" )
22
-
23
- call s: expect (client_info.version .major).to_be_number ()
24
- call s: expect (client_info.version .minor).to_be_number ()
25
- call s: expect (client_info.version .patch).to_be_number ()
26
- endfunction
27
-
28
- function ! s: suite .get_rplugin_client_info () abort
29
- let client_info = s: client_chans [0 ]
30
-
31
- call s: expect (sort (keys (client_info))).to_equal (
32
- \ [" attributes" , " methods" , " name" , " type" , " version" ])
33
-
34
- call s: expect (client_info.attributes).to_be_dict ()
35
- call s: expect (client_info.methods).to_equal ({" specs" : {" nargs" : 1 }, " poll" : {}})
36
- call s: expect (client_info.name).to_equal (" ruby-rplugin-host" )
37
- call s: expect (client_info.type ).to_equal (" host" )
38
-
39
- call s: expect (client_info.version .major).to_be_number ()
40
- call s: expect (client_info.version .minor).to_be_number ()
41
- call s: expect (client_info.version .patch).to_be_number ()
12
+ function ! s: suite .get_client_info () abort
13
+ for client_info in s: client_chans
14
+ call s: expect (sort (keys (client_info))).to_equal (
15
+ \ [" attributes" , " methods" , " name" , " type" , " version" ])
16
+
17
+ call s: expect (client_info.attributes).to_be_dict ()
18
+ call s: expect (client_info.methods).to_equal ({" specs" : {" nargs" : 1 }, " poll" : {}})
19
+ call s: expect (client_info.name).to_match (" ruby-\\ (script\\ |rplugin\\ )-host" )
20
+ call s: expect (client_info.type ).to_equal (" host" )
21
+
22
+ call s: expect (client_info.version .major).to_be_number ()
23
+ call s: expect (client_info.version .minor).to_be_number ()
24
+ call s: expect (client_info.version .patch).to_be_number ()
25
+ endfor
42
26
endfunction
0 commit comments