Test: Batchify all && Lint run_test.sh

All tests in the same batch, in other words, no independant test
This commit is contained in:
Tinmarino 2020-08-23 03:42:02 -04:00
parent 817641e551
commit 8e5274b1a2
13 changed files with 75 additions and 175 deletions

View File

@ -6,7 +6,6 @@ Given txt (txt):
txt txt
Execute (VimWei vars #980): Execute (VimWei vars #980):
call CopyResources()
" Set " Set
call UnloadVimwiki() call UnloadVimwiki()
let wiki = {} let wiki = {}
@ -52,7 +51,7 @@ Execute (VimWei vars #980):
bprevious bprevious
Log 'Path (Current): ' . getcwd() Log 'Path (Current): ' . getcwd()
Log 'File (Buffer):' . @% Log 'File (Buffer):' . @%
bdelete index.md bwipeout index.md
" Clean " Clean
Log 'Clean up' Log 'Clean up'

View File

@ -5,11 +5,6 @@
# So I used C-L # So I used C-L
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Execute (VimwikiGoto buzz_bozz && Assert): Execute (VimwikiGoto buzz_bozz && Assert):
VimwikiIndex 2 VimwikiIndex 2
VimwikiGoto buzz_bozz VimwikiGoto buzz_bozz
@ -78,7 +73,6 @@ Execute (:VimwikiGoto + Completion in directory):
Execute (Clean): Execute (Clean):
call DeleteFile("$HOME/testmarkdown/dir1/dir2/test_goto_file.md") call DeleteFile("$HOME/testmarkdown/dir1/dir2/test_goto_file.md")
call DeleteFile("$HOME/testmarkdown/index.md")
call system("rm $HOME/testmarkdown/dir1") call system("rm $HOME/testmarkdown/dir1")
# vim: sw=2 foldmethod=indent foldlevel=30 foldignore= # vim: sw=2 foldmethod=indent foldlevel=30 foldignore=

View File

@ -1,10 +1,5 @@
# Travel thought files # Travel thought files
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Given (Void for Accessing other files within vimwiki #979 {{{1): Given (Void for Accessing other files within vimwiki #979 {{{1):
@ -29,7 +24,4 @@ Do (At Index: Create and goto markdownfile):
dd dd
:call DeleteFile('mdfile.md')\<Cr> :call DeleteFile('mdfile.md')\<Cr>
Execute (Clean):
call DeleteFile("$HOME/testmarkdown/index.md")
# vim: sw=2:foldmethod=marker:foldlevel=30:foldignore=: # vim: sw=2:foldmethod=marker:foldlevel=30:foldignore=:

View File

@ -1,9 +1,5 @@
# Blockquotes in html convertion # Blockquotes in html convertion
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Given (Void): Given (Void):
Execute (Edit TestHtml Wiki): Execute (Edit TestHtml Wiki):

View File

@ -1,9 +1,5 @@
# Conertion: Wiki -> Html # Conertion: Wiki -> Html
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
################################################# #################################################
Given vimwiki (Comments): Given vimwiki (Comments):
This is some text This is some text

View File

@ -1,9 +1,5 @@
# Feature to generate a diray RSS feed (PR #934) # Feature to generate a diray RSS feed (PR #934)
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Given (Void): Given (Void):
Execute (Generate HTML and RSS feed): Execute (Generate HTML and RSS feed):
@ -21,8 +17,9 @@ Do (Get HTML file):
kdgg kdgg
# Delete everything below # Delete everything below
jdG jdG
# Save (Not necessary) # Save (Not necessary) => Actually make rest of batch freeze, do you really want
:write # to quit buffer
# :write
Expect (RSS link in HTML): Expect (RSS link in HTML):
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> <link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
@ -34,7 +31,7 @@ Do (Get RSS feed):
# Replace pubDate with dummy as it's based on file modification time # Replace pubDate with dummy as it's based on file modification time
:%s@<pubDate>.*</pubDate>@<pubDate>...</pubDate>@g\<CR> :%s@<pubDate>.*</pubDate>@<pubDate>...</pubDate>@g\<CR>
# Save (Not necessary) # Save (Not necessary)
:write # :write
Expect (RSS): Expect (RSS):
# TODO the next line is deleted with -Es # TODO the next line is deleted with -Es
@ -107,3 +104,6 @@ Expect (RSS):
</item> </item>
</channel> </channel>
</rss> </rss>
Execute (Clean buffer modification):
edit! $HOME/testwiki/index.wiki

View File

@ -4,9 +4,7 @@
# - buffer list insertion (see: vimwiki#base#update_listing_in_buffer) # - buffer list insertion (see: vimwiki#base#update_listing_in_buffer)
Execute (Copy Wiki's Resources): Execute (Reset sw to default (due to batch)):
Log "Start: Copy Resources"
call CopyResources()
set sw=8 set sw=8
# 1 VimwikiGenerateLinks {{{1 # 1 VimwikiGenerateLinks {{{1
@ -198,7 +196,6 @@ Expect (diary index generated):
Execute (Clean): Execute (Clean):
call DeleteFile("$HOME/testmarkdown/index.md")
call DeleteFile('$HOME/testmarkdown/diary/2019-12-10.md') call DeleteFile('$HOME/testmarkdown/diary/2019-12-10.md')
call DeleteFile('$HOME/testmarkdown/diary/2019-07-13.md') call DeleteFile('$HOME/testmarkdown/diary/2019-07-13.md')
call DeleteFile('$HOME/testmarkdown/diary/2019-03-01.md') call DeleteFile('$HOME/testmarkdown/diary/2019-03-01.md')

View File

@ -6,11 +6,6 @@
# Create directories I remove at end {{{1 # Create directories I remove at end {{{1
########################################## ##########################################
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Execute (Mkdir dir1 dir2 dir11 dir12): Execute (Mkdir dir1 dir2 dir11 dir12):
call system("mkdir $HOME/testmarkdown/dir1") call system("mkdir $HOME/testmarkdown/dir1")
call system("mkdir $HOME/testmarkdown/dir1/dir11") call system("mkdir $HOME/testmarkdown/dir1/dir11")

View File

@ -6,63 +6,16 @@
# 0 Configure {{{1 # 0 Configure {{{1
################## ##################
Execute (Configure: Set vimwiki list to markdown resource):
Log "Let mapleader = ,"
let mapleader = ','
Log "Destroy vimrc or previous run heritage"
call DestroyVar('g:vimwiki_list')
call DestroyVar('g:vimwiki_global_vars')
call DestroyVar('g:vimwiki_wikilocal_vars')
Log "Destroy vimrc variable, works better that way"
call DestroyVar('g:vimwiki_default')
call DestroyVar('g:vimwiki_markdown')
call DestroyVar('g:vimwiki_mediawiki')
Log "Declare my vimwiki_list"
let g:vimwiki_list = [{
\ 'path': 'test/resources/testmarkdown',
\ 'syntax': 'markdown',
\ 'ext': '.md'
\ }]
Log "Declare my extension for temporary wiki"
let g:vimwiki_ext2syntax = {'.md': 'markdown'}
Log "Reload vimwiki"
nmapclear
" UNlet what can be
for i in ['g:vimwiki_commentstring',
\ 'b:did_ftplugin',
\ 'g:loaded_vimwiki',
\ 'g:vimwiki_global_vars',
\ 'g:vimwiki_wikilocal_vars',
\ 'g:vimwiki_syntaxlocal_vars',
\ ]
if exists(i)
exe 'unlet ' . i
endif
endfor
" Source plugin: Go
runtime! plugin/vimwiki.vim
Execute (Assert: 2 wiki in Index):
AssertEqual 2, len(vimwiki_wikilocal_vars)
Execute (VimwikiIndex): Execute (VimwikiIndex):
VimwikiIndex 1 VimwikiIndex 2
AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr')
AssertEqual 'vimwiki', &filetype AssertEqual 'vimwiki', &filetype
AssertEqual 'test/resources/testmarkdown/', vimwiki_wikilocal_vars[0]['path'] AssertEqual $HOME . '/testmarkdown/', vimwiki_wikilocal_vars[0]['path']
AssertEqual 'test/resources/testmarkdown/index.md', expand('%') AssertEqual $HOME . 'testmarkdown/index.md', expand('%')
Execute (Open buzz bozz): Execute (Open buzz bozz):
edit test/resources/testmarkdown/buzz_bozz.md edit $HOME/testmarkdown/buzz_bozz.md
AssertEqual 'test/resources/testmarkdown/buzz_bozz.md', expand('%') AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%')
# 1 Global {{{1 # 1 Global {{{1
############### ###############
@ -72,28 +25,28 @@ Execute (===========================================================):
Do (,ww -> open index [Assert]): Do (,ww -> open index [Assert]):
,ww ,ww
:AssertEqual 'test/resources/testmarkdown/index.md', expand('%') :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,wt -> open index in tab [Assert]): Do (,wt -> open index in tab [Assert]):
,wt ,wt
:AssertEqual 'test/resources/testmarkdown/index.md', expand('%') :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')
\<CR> \<CR>
:call AssertTab(2) :call AssertTab(2)
\<CR> \<CR>
Do (,w,w -> open diary [Assert]): Do (,w,w -> open diary [Assert]):
,w,w ,w,w
:AssertEqual 'test/resources/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%') :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,w,t -> open diary in tab [Assert]): Do (,w,t -> open diary in tab [Assert]):
,w,t ,w,t
:AssertEqual 'test/resources/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%') :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%')
\<CR> \<CR>
:call AssertTab(2) :call AssertTab(2)
\<CR> \<CR>
@ -102,28 +55,28 @@ Do (,ws -> list and select wiki [Assert]):
,ws ,ws
1 1
\<CR> \<CR>
:AssertEqual 'test/resources/testmarkdown/index.md', expand('%') :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,wi -> open diary index [Assert]): Do (,wi -> open diary index [Assert]):
,wi ,wi
:AssertEqual 'test/resources/testmarkdown/diary/diary.md', expand('%') :AssertEqual $HOME . '/testmarkdown/diary/diary.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,w,y -> open yesterday [Assert]): Do (,w,y -> open yesterday [Assert]):
,w,y ,w,y
:AssertEqual 'test/resources/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() - 60*60*24) . '.md', expand('%') :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() - 60*60*24) . '.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,w,m -> open tomorrow [Assert]): Do (,w,m -> open tomorrow [Assert]):
,wm ,wm
:AssertEqual 'test/resources/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() + 60*60*24) . '.md', expand('%') :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() + 60*60*24) . '.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
@ -144,13 +97,13 @@ Do (,wn -> Create new wiki [Assert]):
,wn ,wn
new_file1 new_file1
\<CR> \<CR>
:AssertEqual 'test/resources/testmarkdown/new_file1.md', expand('%') :AssertEqual $HOME . '/testmarkdown/new_file1.md', expand('%')
\<CR> \<CR>
:call AssertTab(1) :call AssertTab(1)
\<CR> \<CR>
Do (,wd -> Delete wiki yes [Assert]): Do (,wd -> Delete wiki yes [Assert]):
:edit 'test/resources/testmarkdown/file_new1.md' :edit $HOME . '/testmarkdown/file_new1.md'
\<CR> \<CR>
,wn ,wn
@ -163,11 +116,11 @@ Do (,wd -> Delete wiki yes [Assert]):
yes yes
\<CR> \<CR>
:AssertEqual 'test/resources/testmarkdown/index.md', expand('%') :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')
\<CR> \<CR>
Do (,wd -> Delete wiki no [Assert]): Do (,wd -> Delete wiki no [Assert]):
:edit 'test/resources/testmarkdown/file_new1.md' :edit $HOME . '/testmarkdown/file_new1.md'
\<CR> \<CR>
,wn ,wn
@ -180,7 +133,7 @@ Do (,wd -> Delete wiki no [Assert]):
no no
\<CR> \<CR>
:AssertEqual 'test/resources/testmarkdown/new_file2.md', expand('%') :AssertEqual $HOME . '/testmarkdown/new_file2.md', expand('%')
\<CR> \<CR>
Do (,wn -> Rename wiki [Assert]): Do (,wn -> Rename wiki [Assert]):
@ -194,7 +147,7 @@ Do (,wn -> Rename wiki [Assert]):
new_file2 new_file2
\<CR> \<CR>
:AssertEqual 'test/resources/testmarkdown/new_file2.md', expand('%') :AssertEqual $HOME . '/testmarkdown/new_file2.md', expand('%')
\<CR> \<CR>
Given (Some headings): Given (Some headings):

View File

@ -4,8 +4,8 @@
# output function. # output function.
# Say Hi # Say Hi
echo -en "Starting $(basename $0) for VimWiki\n" echo -en "Starting $(basename "$0") for VimWiki\n"
start_time=`date +%s` start_time=$(date +%s)
# For windows: Cmder bash is appending busybox to the path and # For windows: Cmder bash is appending busybox to the path and
# and a smlll vim is included, so that override the windows path vim # and a smlll vim is included, so that override the windows path vim
@ -60,23 +60,16 @@ runVader() {
# Parse tests files to execute # Parse tests files to execute
if [[ -z $file_test ]]; then if [[ -z $file_test ]]; then
ind="test/independent_runs/*.vader"
res="test/*" res="test/*"
else else
read -ra TEST <<< "$file_test" read -ra TEST <<< "$file_test"
for i in "${TEST[@]}"; do for i in "${TEST[@]}"; do
if [[ "$i" == "independent_runs/"*"*"* ]]; then if [[ "$i" == *"*"* ]]; then
ind="$ind test/${i}"
elif [[ "$i" == *"*"* ]]; then
res="$res test/${i}" res="$res test/${i}"
elif [[ -f "$i" ]]; then elif [[ -f "$i" ]]; then
res="$res test/${i}" res="$res test/${i}"
elif [[ -f "${i}.vader" ]]; then elif [[ -f "${i}.vader" ]]; then
res="$res test/${i}.vader" res="$res test/${i}.vader"
elif [[ -f "independent_runs/${i}" ]]; then
ind="$ind test/independent_runs/${i}"
elif [[ -f "independent_runs/${i}.vader" ]]; then
ind="$ind test/independent_runs/${i}.vader"
else else
printf "WARNING: Test \"%s\" not found.\n", "$i" printf "WARNING: Test \"%s\" not found.\n", "$i"
fi fi
@ -94,10 +87,10 @@ runVader() {
home_save="$HOME" home_save="$HOME"
# Create temporary root # Create temporary root
mkdir -p $tmp_dir/vader_wiki mkdir -p "$tmp_dir/vader_wiki"
mkdir -p $tmp_dir/vader_wiki/home mkdir -p "$tmp_dir/vader_wiki/home"
mkdir -p $tmp_dir/vader_wiki/home/test mkdir -p "$tmp_dir/vader_wiki/home/test"
mkdir -p $tmp_dir/vader_wiki/testplugin mkdir -p "$tmp_dir/vader_wiki/testplugin"
# Set vars # Set vars
export ROOT="$tmp_dir/vader_wiki/" export ROOT="$tmp_dir/vader_wiki/"
@ -127,57 +120,40 @@ runVader() {
# flags=(--rm -v "$PWD/../:/testplugin" -v "$PWD/../test:/home" -w /testplugin vimwiki) # flags=(--rm -v "$PWD/../:/testplugin" -v "$PWD/../test:/home" -w /testplugin vimwiki)
echo -e "\nCopying resources to $ROOT" echo -e "\nCopying resources to $ROOT"
# Copy testplugin # Copy testplugin
cp -rf $wiki_path/* $ROOT/testplugin/ cp -rf "$wiki_path/"* "$ROOT/testplugin/"
# Copy home # Copy home
cp -rf $script_path/* $HOME/test/ cp -rf "$script_path/"* "$HOME/test/"
# Copy rtp.vim # Copy rtp.vim
cp -rf $script_path/resources/rtp_local.vim $ROOT/rtp.vim cp -rf "$script_path/resources/rtp_local.vim" "$ROOT/rtp.vim"
# Copy vader <- internet # Copy vader <- internet
echo 'Cloning Vader (git, do not care the fatal)' echo 'Cloning Vader (git, do not care the fatal)'
git clone --depth 10 https://github.com/junegunn/vader.vim /tmp/vader_wiki/vader 2>&1 git clone --depth 10 https://github.com/junegunn/vader.vim /tmp/vader_wiki/vader 2>&1
fi fi
# Run batch of tests # Run batch of tests
# shellcheck disable=SC2086,SC2206
if [[ "$res" != "" ]]; then if [[ "$res" != "" ]]; then
if [[ "$v" == "local" ]]; then if [[ "$v" == "local" ]]; then
pushd $tmp_dir/vader_wiki/testplugin pushd "$tmp_dir/vader_wiki/testplugin" \
|| echo 'Warning pushd testplugin failed'
# Run the tests # Run the tests
echo -e "\nStarting Batch Vim/Vader <- $res" acmd=("$vim" $vim_opt \"+Vader! ${res}\" "2>&1")
"$vim" $vim_opt "+Vader! ${res}" 2>&1 echo -e "\nStarting Batch Vim/Vader:\n${acmd[*]}\n<- $res\n"
ret=${PIPESTATUS[1]}; err=$(( $err + $ret )) ${acmd[*]}
ret=${PIPESTATUS[1]}; err=$(( err + ret ))
echo -e "\nReturned Batch Vim/Vader -> $ret" echo -e "\nReturned Batch Vim/Vader -> $ret"
popd popd \
|| echo 'Warning popd also failed'
else else
# In docker # In docker
echo -e "\nStarting Independant Vim/Vader <- $res" acmd=(docker run -a stderr -e "VADER_OUTPUT_FILE=/dev/stderr"
docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${flags[@]}" \ "${flags[@]}" "$v" $vim_opt \"+Vader! ${res}\" "2>&1")
"$v" $vim_opt "+Vader! ${res}" 2>&1 | vader_filter | vader_color echo -e "\nStarting Batch Vim/Vader:\n${acmd[*]}\n<- $res\n"
ret=${PIPESTATUS[1]}; err=$(( $err + $ret )) ${acmd[*]} | vader_filter | vader_color
echo -e "\nReturned Independant Docker/Vim/Vader -> $ret" ret=${PIPESTATUS[1]}; err=$(( err + ret ))
fi echo -e "\nReturned Batch Docker/Vim/Vader -> $ret"
fi
# Run Tests that must be run in individual vim instances
# see README.md for more information
if [[ "$ind" != "" ]]; then
test_cmd="for VF in ${ind}; do $vim $vim_opt \"+Vader! \$VF\"; done"
if [[ "$v" == "local" ]]; then
pushd $tmp_dir/vader_wiki/testplugin
echo -e "\nStarting Vim/Vader <- $test_cmd"
bash -c "$test_cmd" 2>&1
ret=${PIPESTATUS[1]}; err=$(( $err + $ret ))
echo -e "\nReturned Vim/Vader -> $ret"
popd
else # In docker
echo -e "\nStarting Docker/Vim/Vader <- $test_cmd"
docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${flags[@]}" \
/bin/bash -c "$test_cmd" 2>&1 | vader_filter | vader_color
ret=${PIPESTATUS[1]}; err=$(( $err + $ret ))
echo -e "\nReturned Docker/Vim/Vader -> $ret"
fi fi
fi fi
@ -196,14 +172,16 @@ runVint() {
cmd="vint -s . && vint -s test/vimrc" cmd="vint -s . && vint -s test/vimrc"
if echo "$vers" | grep "local" > /dev/null; then if echo "$vers" | grep "local" > /dev/null; then
echo -e "\nRunning Vint: $cmd : in $wiki_path" echo -e "\nRunning Vint: $cmd : in $wiki_path"
pushd $wiki_path > /dev/null pushd "$wiki_path" > /dev/null \
|| echo 'Warning pushd wiki_path failed'
$cmd $cmd
err=$(( $err | $? )) err=$(( err | $? ))
popd > /dev/null popd > /dev/null \
|| echo 'Warning popd also failed'
else else
echo -e "\nStarting Docker container and running Vint: $cmd" echo -e "\nStarting Docker container and running Vint: $cmd"
docker run -a stdout "${flags[@]}" bash -c "$cmd" docker run -a stdout "${flags[@]}" bash -c "$cmd"
err=$(( $err | $? )) err=$(( err | $? ))
fi fi
return $err return $err
} }
@ -287,10 +265,10 @@ vader_color() {
} }
# path of the script, supposing no spaces # path of the script, supposing no spaces
script_file="$(dirname $0)" script_file="$(dirname "$0")"
script_path="$( realpath $script_file )" script_path="$( realpath "$script_file" )"
wiki_path="$( realpath $script_path/.. )" wiki_path="$( realpath "$script_path/.." )"
tmp_dir=$(dirname $(mktemp -u)) tmp_dir="$(dirname "$(mktemp -u)")"
# list of vim/nvim versions # list of vim/nvim versions
vers="$(getVers)" vers="$(getVers)"
@ -358,20 +336,20 @@ case $type in
"vader" ) "vader" )
runVader ; err=$? runVader ; err=$?
echo "Main Vader: returned $err" echo "Main Vader: returned $err"
o_error=$(( $err | $o_error )) o_error=$(( err | o_error ))
;; ;;
"vint" ) "vint" )
runVint ; err=$? runVint ; err=$?
echo "Main Vint: returned $err" echo "Main Vint: returned $err"
o_error=$(( $err | $o_error )) o_error=$(( err | o_error ))
;; ;;
"all" ) "all" )
runVint ; err=$? runVint ; err=$?
echo "Main Vint: returned $err" echo "Main Vint: returned $err"
o_error=$(( $err | $o_error )) o_error=$(( err | o_error ))
runVader ; err=$? runVader ; err=$?
echo "Main Vader: returned $err" echo "Main Vader: returned $err"
o_error=$(( $err | $o_error )) o_error=$(( err | o_error ))
;; ;;
* ) * )
echo "Error: invalid type - '$type'" 1>&2 echo "Error: invalid type - '$type'" 1>&2
@ -379,10 +357,10 @@ case $type in
esac esac
# Calcultate time # Calcultate time
end_time=`date +%s` end_time=$(date +%s)
sec_time=$((end_time - start_time)) sec_time=$((end_time - start_time))
printf -v script_time '%dh:%dm:%ds' $(($sec_time/3600)) $(($sec_time%3600/60)) $(($sec_time%60)) printf -v script_time '%dh:%dm:%ds' $((sec_time/3600)) $((sec_time%3600/60)) $((sec_time%60))
# Exit # Exit
echo -ne "Script $(basename $0), in $script_time, Returned -> $o_error\n\n" echo -ne "Script $(basename "$0"), in $script_time, Returned -> $o_error\n\n"
exit $o_error exit $o_error

View File

@ -1,10 +1,6 @@
# Tag generation and navigation # Tag generation and navigation
# Note: The Generate must be in Execute # Note: The Generate must be in Execute
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Execute (Setup): Execute (Setup):
set sw=4 set sw=4
AssertEqual 4, &sw AssertEqual 4, &sw

View File

@ -200,7 +200,7 @@
" Write current file: helper to hide `set bt=` " Write current file: helper to hide `set bt=`
function! WriteMe() function! WriteMe()
set buftype= set buftype=
write % write! %
endfunction endfunction
" Delete a file <- path <string> " Delete a file <- path <string>
@ -293,4 +293,8 @@
AssertEqual a:one, a:two AssertEqual a:one, a:two
endfunction endfunction
" Copy Wiki's Resources
call CopyResources()
" vim: ft=vim:sw=2 " vim: ft=vim:sw=2