mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 07:40:05 +08:00
Add test for web html api
This commit is contained in:
parent
a761d83935
commit
dc987e3bcd
@ -182,7 +182,7 @@ function! s:template.toString() dict abort
|
|||||||
return xml
|
return xml
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! webapi#xml#createElement(name) abort
|
function! s:self.createElement(name) abort
|
||||||
let node = deepcopy(s:template)
|
let node = deepcopy(s:template)
|
||||||
let node.name = a:name
|
let node.name = a:name
|
||||||
return node
|
return node
|
||||||
|
4
test/api/web/html.vader
Normal file
4
test/api/web/html.vader
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Execute (Test web#http api):
|
||||||
|
let g:test_api_web_html = SpaceVim#api#import('web#html')
|
||||||
|
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('spacevim.org')
|
||||||
|
AssertEqual g:test_api_web_html_paser.child[1].child[21].child[0], 'Home - SpaceVim'
|
Loading…
Reference in New Issue
Block a user