Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Aug 10, 2020
1 parent cbcddd5 commit 55b2af0
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 61 deletions.
82 changes: 41 additions & 41 deletions test/behavior/Fern.vimspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,38 @@ Describe Fern
Fern debug:/// -wait
Assert Equals(winnr('$'), 1)
Assert Equals(getline(1, '$'), [
\ 'root ',
\ '|+ deep ',
\ '|+ heavy ',
\ '|+ shallow ',
\ '| leaf ',
\ 'root',
\ '|+ deep',
\ '|+ heavy',
\ '|+ shallow',
\ '| leaf',
\])
End

It Fern debug:/// -reveal=deep/alpha/beta reveals to 'deep/alpha/beta'
Fern debug:/// -reveal=deep/alpha/beta -wait
Assert Equals(getline(1, '$'), [
\ 'root ',
\ '|- deep ',
\ ' |- alpha ',
\ ' |- beta ',
\ ' | gamma ',
\ '|+ heavy ',
\ '|+ shallow ',
\ '| leaf ',
\ 'root',
\ '|- deep',
\ ' |- alpha',
\ ' |- beta',
\ ' | gamma',
\ '|+ heavy',
\ '|+ shallow',
\ '| leaf',
\])
End

It Fern debug:/// -reveal=deep/alpha/zeta reveals to 'deep/alpha'
Fern debug:/// -reveal=deep/alpha/zeta -wait
Assert Equals(getline(1, '$'), [
\ 'root ',
\ '|- deep ',
\ ' |- alpha ',
\ ' |+ beta ',
\ '|+ heavy ',
\ '|+ shallow ',
\ '| leaf ',
\ 'root',
\ '|- deep',
\ ' |- alpha',
\ ' |+ beta',
\ '|+ heavy',
\ '|+ shallow',
\ '| leaf',
\])
End
End
Expand All @@ -66,22 +66,22 @@ Describe Fern
execute printf('Fern %s -wait', fnameescape(workdir))
Assert Equals(winnr('$'), 1)
Assert Equals(getline(2, '$'), [
\ '|+ deep ',
\ '|+ shallow ',
\ '| leaf ',
\ '|+ deep',
\ '|+ shallow',
\ '| leaf',
\])
End

It Fern {workdir} -reveal=deep/alpha/beta reveals to 'deep/alpha/beta'
execute printf('Fern %s -reveal=deep/alpha/beta -wait', fnameescape(workdir))
Assert Equals(winnr('$'), 1)
Assert Equals(getline(2, '$'), [
\ '|- deep ',
\ ' |- alpha ',
\ ' |- beta ',
\ ' | gamma ',
\ '|+ shallow ',
\ '| leaf ',
\ '|- deep',
\ ' |- alpha',
\ ' |- beta',
\ ' | gamma',
\ '|+ shallow',
\ '| leaf',
\])
End

Expand All @@ -93,12 +93,12 @@ Describe Fern
\)
Assert Equals(winnr('$'), 1)
Assert Equals(getline(2, '$'), [
\ '|- deep ',
\ ' |- alpha ',
\ ' |- beta ',
\ ' | gamma ',
\ '|+ shallow ',
\ '| leaf ',
\ '|- deep',
\ ' |- alpha',
\ ' |- beta',
\ ' | gamma',
\ '|+ shallow',
\ '| leaf',
\])
End

Expand All @@ -110,12 +110,12 @@ Describe Fern
\)
Assert Equals(winnr('$'), 1)
Assert Equals(getline(2, '$'), [
\ '|- deep ',
\ ' |- alpha ',
\ ' |- beta ',
\ ' | gamma ',
\ '|+ shallow ',
\ '| leaf ',
\ '|- deep',
\ ' |- alpha',
\ ' |- beta',
\ ' | gamma',
\ '|+ shallow',
\ '| leaf',
\])
End
End
Expand Down
20 changes: 10 additions & 10 deletions test/behavior/buffer-rename.vimspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Describe buffer-rename
call timer_start(0, { -> feedkeys("\<C-w>OMEGA\<CR>") })
execute "normal ggj\<Plug>(fern-action-move)\<Plug>(fern-wait)"
Assert Equals(getline(1, '$'), [
\ printf('%s ', fnamemodify(workdir, ':t')),
\ '| OMEGA ',
\ '| beta ',
\ '| gamma ',
\ printf('%s', fnamemodify(workdir, ':t')),
\ '| OMEGA',
\ '| beta',
\ '| gamma',
\])
Assert NotMatch(execute('ls'), '\<alpha\>')
Assert Match(execute('ls'), '\<OMEGA\>')
Expand All @@ -38,9 +38,9 @@ Describe buffer-rename
call timer_start(0, { -> feedkeys("y\<CR>") })
execute "normal ggj\<Plug>(fern-action-remove)\<Plug>(fern-wait)"
Assert Equals(getline(1, '$'), [
\ printf('%s ', fnamemodify(workdir, ':t')),
\ '| beta ',
\ '| gamma ',
\ printf('%s', fnamemodify(workdir, ':t')),
\ '| beta',
\ '| gamma',
\])
Assert NotMatch(execute('ls'), '\<alpha\>')
End
Expand All @@ -54,9 +54,9 @@ Describe buffer-rename
call timer_start(0, { -> feedkeys("y\<CR>") })
execute "normal ggj\<Plug>(fern-action-remove)\<Plug>(fern-wait)"
Assert Equals(getline(1, '$'), [
\ printf('%s ', fnamemodify(workdir, ':t')),
\ '| beta ',
\ '| gamma ',
\ printf('%s', fnamemodify(workdir, ':t')),
\ '| beta',
\ '| gamma',
\])
Assert Match(execute('ls'), '\<alpha\>')
End
Expand Down
20 changes: 10 additions & 10 deletions test/fern/renderer/default.vimspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Describe fern#renderer#default
\)
Assert Equals(e, v:null)
Assert Equals(r, [
\ 'root ',
\ '|- shallow ',
\ ' |+ alpha ',
\ ' |+ beta ',
\ ' | gamma ',
\ 'root',
\ '|- shallow',
\ ' |+ alpha',
\ ' |+ beta',
\ ' | gamma',
\])
End

Expand All @@ -58,11 +58,11 @@ Describe fern#renderer#default
\)
Assert Equals(e, v:null)
Assert Equals(r, [
\ 'root ',
\ '|- shallow ',
\ ' |+ alpha ',
\ ' |+ beta ',
\ ' | gamma ',
\ 'root',
\ '|- shallow',
\ ' |+ alpha',
\ ' |+ beta',
\ ' | gamma',
\])
End
End
Expand Down

0 comments on commit 55b2af0

Please sign in to comment.