tide/tests/_tide_item_status.test.fish

62 lines
827 B
Fish
Raw Normal View History

2021-01-26 04:34:15 +03:00
# RUN: %fish %s
2020-05-09 08:48:35 +03:00
function _status
2020-06-06 21:57:43 +03:00
set -g _tide_last_pipestatus $pipestatus
2020-05-22 00:58:09 +03:00
_tide_decolor (_tide_item_status)
2020-05-06 19:42:52 +03:00
end
2021-01-25 22:22:28 +03:00
2020-07-12 02:45:23 +03:00
set -lx tide_status_success_icon
set -lx tide_status_failure_icon
2021-01-26 04:34:15 +03:00
true | false
_status # CHECK: 0|1
false | true
_status # CHECK: 1|0
2020-07-12 02:45:23 +03:00
set -lx tide_status_success_icon '✔'
set -lx tide_status_failure_icon '✘'
2021-01-25 22:22:28 +03:00
2020-07-23 19:12:08 +03:00
set -lx tide_status_always_display false
2020-07-09 04:37:47 +03:00
2021-01-26 04:34:15 +03:00
true
_status # CHECK:
false
_status # CHECK:
true | false
_status # CHECK: ✘ 0|1
true | true
_status # CHECK:
false | true
_status # CHECK: ✔ 1|0
false | false
_status # CHECK: ✘ 1|1
2020-07-09 04:37:47 +03:00
2021-01-25 22:22:28 +03:00
2020-07-23 19:12:08 +03:00
set -lx tide_status_always_display true
2020-07-09 04:37:47 +03:00
2021-01-26 04:34:15 +03:00
true
_status # CHECK: ✔
false
_status # CHECK: ✘ 1
true | false
_status # CHECK: ✘ 0|1
true | true
_status # CHECK: ✔
false | true
_status # CHECK: ✔ 1|0
false | false
_status # CHECK: ✘ 1|1