Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
let s:suite = themis#suite('parser') | ||
let s:assert = themis#helper('assert') | ||
|
||
function! s:suite.internal() | ||
VimShellCreate | ||
|
||
let $FOO = '' | ||
call vimshell#execute('export FOO=foo') | ||
call s:assert.equals($FOO, 'foo') | ||
|
||
" It contains space | ||
let $FOO = '' | ||
call vimshell#execute('export FOO="foo bar"') | ||
call s:assert.equals($FOO, 'foo bar') | ||
|
||
let $FOO = '' | ||
let $BAR = '' | ||
call vimshell#execute('export FOO="foo" BAR="bar"') | ||
call s:assert.equals($FOO, 'foo') | ||
call s:assert.equals($BAR, 'bar') | ||
|
||
" Error pattern | ||
let $FOO = '' | ||
let $BAR = '' | ||
call vimshell#execute('export FOO = "foo" BAR="bar"') | ||
call s:assert.equals($FOO, '') | ||
call s:assert.equals($BAR, '') | ||
|
||
VimShellCreate -toggle | ||
endfunction | ||
|
||
" vim:foldmethod=marker:fen: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
let s:suite = themis#suite('parser') | ||
let s:assert = themis#helper('assert') | ||
|
||
function! s:suite.prompt() | ||
let g:vimshell_prompt = "'% ' " | ||
let g:vimshell_secondary_prompt = 'aaa ' | ||
VimShellCreate -toggle | ||
call s:assert.equals(vimshell#get_prompt(), "'% ' ") | ||
call s:assert.equals(vimshell#get_secondary_prompt(), 'aaa ') | ||
VimShellCreate -toggle | ||
|
||
let g:vimshell_user_prompt = 'fnamemodify(getcwd(), ":~")' | ||
VimShellCreate -toggle | ||
call s:assert.equals(vimshell#get_user_prompt(), | ||
\ 'fnamemodify(getcwd(), ":~")') | ||
VimShellCreate -toggle | ||
let g:vimshell_user_prompt = "" | ||
endfunction | ||
|
||
function! s:suite.options() | ||
VimShellCreate -toggle -prompt=foo\ bar | ||
call s:assert.equals(vimshell#get_prompt(), 'foo bar') | ||
VimShellCreate -toggle | ||
endfunction | ||
|
||
" vim:foldmethod=marker:fen: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
let s:suite = themis#suite('parser') | ||
let s:assert = themis#helper('assert') | ||
|
||
function! s:suite.alias() | ||
VimShellCreate | ||
call vimshell#set_alias('l2', 'll') | ||
call vimshell#set_alias('ll', 'ls -l') | ||
call s:assert.equals( | ||
\ vimshell#parser#parse_alias('l2'), 'ls -l') | ||
VimShellCreate -toggle | ||
endfunction | ||
|
||
function! s:suite.getopt() | ||
call s:assert.equals(vimshell#parser#getopt(['foo', 'bar'], { | ||
\ 'noarg' : ['--insert'], | ||
\ }), [['foo', 'bar'], {}]) | ||
endfunction | ||
|
||
" vim:foldmethod=marker:fen: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.