tide/tests/status.fish

14 lines
501 B
Fish
Raw Normal View History

2020-05-10 01:38:07 +03:00
@mesg '------------status------------'
2020-05-09 08:48:35 +03:00
function _status
2020-05-06 19:42:52 +03:00
set -g last_pipestatus $pipestatus
set -g last_status $status
2020-05-09 08:48:35 +03:00
lean_decolor (_lean_status)
2020-05-06 19:42:52 +03:00
end
2020-05-09 08:48:35 +03:00
@test 'true' (true; _status) -z
@test 'false' (false; _status) -z
2020-05-16 02:27:26 +03:00
@test 'true|false' (true|false; _status) = "$lean_status_failure_icon 0|1 "
2020-05-09 08:48:35 +03:00
@test 'true|true' (true|true; _status) -z
2020-05-16 02:27:26 +03:00
@test 'false|true' (false|true; _status) = "$lean_status_success_icon 1|0 "
@test 'false|false' (false|false; _status) = "$lean_status_failure_icon 1|1 "