fix(cli): make status dividers span terminal width
This commit is contained in:
@@ -182,6 +182,21 @@ assert_equal "0" "${#SCHEDULE[@]}" \
|
||||
EMPTY_OUTPUT="$(NO_COLOR=1 COLUMNS=60 render_dashboard "$EMPTY_NOW")"
|
||||
assert_contains "$EMPTY_OUTPUT" "ALL CLEAR" \
|
||||
"an empty schedule should render the all-clear screen"
|
||||
WIDE_EMPTY_OUTPUT="$(NO_COLOR=1 COLUMNS=180 render_dashboard "$EMPTY_NOW")"
|
||||
WIDE_EMPTY_TOP_LINE="${WIDE_EMPTY_OUTPUT%%$'\n'*}"
|
||||
WIDE_EMPTY_BOTTOM_LINE="${WIDE_EMPTY_OUTPUT##*$'\n'}"
|
||||
assert_equal "180" "${#WIDE_EMPTY_TOP_LINE}" \
|
||||
"the all-clear top divider should span the full terminal width"
|
||||
assert_equal "180" "${#WIDE_EMPTY_BOTTOM_LINE}" \
|
||||
"the all-clear bottom divider should span the full terminal width"
|
||||
|
||||
WIDE_UNAVAILABLE_OUTPUT="$(NO_COLOR=1 COLUMNS=80 render_unavailable 180)"
|
||||
WIDE_UNAVAILABLE_TOP_LINE="${WIDE_UNAVAILABLE_OUTPUT%%$'\n'*}"
|
||||
WIDE_UNAVAILABLE_BOTTOM_LINE="${WIDE_UNAVAILABLE_OUTPUT##*$'\n'}"
|
||||
assert_equal "180" "${#WIDE_UNAVAILABLE_TOP_LINE}" \
|
||||
"the unavailable top divider should span the full terminal width"
|
||||
assert_equal "180" "${#WIDE_UNAVAILABLE_BOTTOM_LINE}" \
|
||||
"the unavailable bottom divider should use the detected terminal width"
|
||||
|
||||
TERMINAL_ACTIVE=1
|
||||
DRAW_OUTPUT="$(draw_frame $'short\nlonger')"
|
||||
|
||||
Reference in New Issue
Block a user