mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-19 21:27:28 +03:00
Fix tests
This commit is contained in:
parent
743becdafe
commit
50f0b03a65
@ -5,7 +5,7 @@ function _cmd_duration -a duration threshold decimals
|
||||
set -g tide_cmd_duration_threshold $threshold
|
||||
set -g tide_cmd_duration_decimals $decimals
|
||||
|
||||
_tide_decolor (_tide_cmd_duration)
|
||||
_tide_decolor (_tide_item_cmd_duration)
|
||||
end
|
||||
|
||||
@test 'Less than threshold' (_cmd_duration 2000 3000 0) -z
|
||||
|
@ -1,11 +1,11 @@
|
||||
@mesg '-----------context-----------'
|
||||
|
||||
set -l sourceFile "$__fish_config_dir/functions/_tide_context.fish"
|
||||
set -l sourceFile "$__fish_config_dir/functions/_tide_item_context.fish"
|
||||
|
||||
function _context
|
||||
_tide_decolor (_tide_context)
|
||||
_tide_decolor (_tide_item_context)
|
||||
end
|
||||
|
||||
@test 'None' (_context) -z
|
||||
@test 'SSH' (set -g SSH_TTY 'true'; _context) = $USER'@'(prompt_hostname)' '
|
||||
@test 'Root' (_tide_decolor (su -c "fish -c 'source $sourceFile;_tide_context'")) = 'root@'(prompt_hostname)' '
|
||||
@test 'Root' (_tide_decolor (su -c "fish -c 'source $sourceFile;_tide_item_context'")) = 'root@'(prompt_hostname)' '
|
@ -1,7 +1,7 @@
|
||||
@mesg '-------------jobs-------------'
|
||||
|
||||
function _jobs
|
||||
_tide_decolor (_tide_jobs)
|
||||
_tide_decolor (_tide_item_jobs)
|
||||
end
|
||||
|
||||
@test 'No Jobs' (_jobs) -z
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
function _pwd -a dir
|
||||
cd $dir
|
||||
_tide_decolor (_tide_pwd)
|
||||
_tide_decolor (_tide_item_pwd)
|
||||
end
|
||||
|
||||
set -l unwr "$tide_pwd_unwritable_icon "
|
||||
@ -14,7 +14,7 @@ set -l unwr "$tide_pwd_unwritable_icon "
|
||||
@test '~/.config' (_pwd "$HOME/.config") = '~/.config '
|
||||
@test '~/.config/fish' (_pwd "$HOME/.config/fish") = '~/.config/fish '
|
||||
|
||||
set -l longDir "$HOME/alfa/bravo/charlie/delta/printf '%s\n'/foxtrot/golf/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa"
|
||||
set -l longDir "$HOME/alfa/bravo/charlie/delta/echo/foxtrot/golf/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa"
|
||||
if not test -e $longDir
|
||||
mkdir -p $longDir
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
function _status
|
||||
set -g last_pipestatus $pipestatus
|
||||
set -g last_status $status
|
||||
_tide_decolor (_tide_status)
|
||||
_tide_decolor (_tide_item_status)
|
||||
end
|
||||
|
||||
@test 'true' (true; _status) -z
|
||||
|
Loading…
Reference in New Issue
Block a user