Test: plaintext html magic
This commit is contained in:
parent
867d81a50c
commit
f9b9b5a768
59
test/convert_default_html.vader
Normal file
59
test/convert_default_html.vader
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
Include: vader_includes/vader_setup.vader
|
||||||
|
|
||||||
|
Execute (Copy Wiki's Resources):
|
||||||
|
Log "Start: Copy Resources"
|
||||||
|
call CopyResources()
|
||||||
|
|
||||||
|
Given (Void):
|
||||||
|
|
||||||
|
Execute (Edit TestHtml Wiki):
|
||||||
|
edit $HOME/testwiki/TestHtml.wiki
|
||||||
|
AssertEqual $HOME . '/testwiki/TestHtml.wiki', expand('%')
|
||||||
|
AssertEqual 'default', vimwiki#vars#get_wikilocal('syntax')
|
||||||
|
AssertEqual 0, vimwiki#vars#get_bufferlocal('wiki_nr')
|
||||||
|
|
||||||
|
Do (Markdwon with %plainhtml):
|
||||||
|
:edit $HOME/testwiki/TestHtml.wiki\<CR>
|
||||||
|
i%plainhtml<div id="test">\<CR>
|
||||||
|
my paragraph\<CR>
|
||||||
|
%plainhtml</div>\<CR>\<Esc>
|
||||||
|
:set bt=\<CR>
|
||||||
|
:write\<CR>
|
||||||
|
|
||||||
|
Execute (Save and Convert to html):
|
||||||
|
edit $HOME/testwiki/TestHtml.wiki
|
||||||
|
Vimwiki2HTML
|
||||||
|
|
||||||
|
Given (Void):
|
||||||
|
|
||||||
|
Do (Get Html body):
|
||||||
|
:read $HOME/html/default/TestHtml.html\<CR>
|
||||||
|
# Goto body
|
||||||
|
gg/<body>\<CR>
|
||||||
|
# Copy in b
|
||||||
|
"bdat
|
||||||
|
# Delete All
|
||||||
|
ggdG
|
||||||
|
# Paste body
|
||||||
|
"bP
|
||||||
|
# Remove last line
|
||||||
|
Gdd
|
||||||
|
# Save (Not necessary)
|
||||||
|
:write
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Expect (Plain Html):
|
||||||
|
# the whole default html file should be here as a base + the modifications
|
||||||
|
# from "Given"
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="test">
|
||||||
|
<p>
|
||||||
|
my paragraph
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
Include: vader_includes/vader_teardown.vader
|
Loading…
Reference in New Issue
Block a user