Test: Add option to configure date string format #1073
This commit is contained in:
@@ -280,7 +280,33 @@ Expect (Plain Html):
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
Execute (Delete):
|
||||
call DeleteFile('$HOME/testwiki/TestHtml.wiki')
|
||||
|
||||
|
||||
Given vimwiki (PR: Add option to configure date string format 1073) {{{1):
|
||||
%template template_1073
|
||||
content
|
||||
|
||||
Do (template_date_format):
|
||||
# Set conf
|
||||
:let g:vimwiki_wikilocal_vars[0]['template_date_format'] = '%b %d, %Y'\<Cr>
|
||||
# Convert
|
||||
:call ConvertWiki2Html()\<Cr>
|
||||
# Erase oth and date
|
||||
:%s/[0-9]\+/Z/g\<Cr>
|
||||
:%s/[A-Z][a-z][a-z]/Z/g\<Cr>
|
||||
# Restore peace
|
||||
:let g:vimwiki_wikilocal_vars[0]['template_date_format'] = ''\<Cr>
|
||||
|
||||
Expect (Date proper format):
|
||||
<html>
|
||||
<body>
|
||||
<div class="content">
|
||||
<p><small>Zt updated on Z Z, Z</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
# vim: sw=2 foldmethod=marker foldlevel=30
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<div class="content">
|
||||
<p><small>Last updated on %date%</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -1,8 +1,7 @@
|
||||
" TODO treat if local (see $HOME in all tests)
|
||||
" TODO mutualise call CopyResources()
|
||||
" TODO mutualise (to prettify output) mode(1) to check if in -Es or not
|
||||
" TODO test tabnext in at least one travis job (without -Es)
|
||||
" TODO (idea) fasten travis difefrent job with the same vimwiki git (-8s)
|
||||
" IDEA fasten travis difefrent job with the same vimwiki git (-8s)
|
||||
|
||||
" Declare tipical Vim preambule
|
||||
" vint: -ProhibitSetNoCompatible
|
||||
@@ -29,6 +28,7 @@
|
||||
let vimwiki_default = {}
|
||||
let vimwiki_default.path = $HOME . '/testwiki'
|
||||
let vimwiki_default.path_html = $HOME . '/html/default'
|
||||
let vimwiki_default.template_path = $HOME . '/testwiki/templates/'
|
||||
let vimwiki_default.syntax = 'default'
|
||||
let vimwiki_default.ext = '.wiki'
|
||||
let vimwiki_default.name = 'DefaultSyntax'
|
||||
|
||||
Reference in New Issue
Block a user