fix: clarify optional integration status
This commit is contained in:
@@ -107,6 +107,10 @@ def _warn_mark():
|
||||
return _color("33", "!")
|
||||
|
||||
|
||||
def _neutral_mark():
|
||||
return _color("2", "–")
|
||||
|
||||
|
||||
def _heading(text):
|
||||
print(_color("1;36", text))
|
||||
|
||||
@@ -145,8 +149,13 @@ def _render_init(result):
|
||||
print()
|
||||
print(_color("1", "Integrations"))
|
||||
for path, status in result["hook_merges"].items():
|
||||
ok = status not in (None, "absent")
|
||||
print(" %s %-26s %s" % (_mark(ok), path, status or "unavailable"))
|
||||
if status in ("absent", "skipped"):
|
||||
marker = _neutral_mark()
|
||||
display = "not needed"
|
||||
else:
|
||||
marker = _mark(status is not None)
|
||||
display = status or "unavailable"
|
||||
print(" %s %-26s %s" % (marker, path, display))
|
||||
extension = result["vscode_extension"]
|
||||
if extension.get("status") not in ("skipped",):
|
||||
ok = extension.get("status") == "installed"
|
||||
|
||||
@@ -469,6 +469,11 @@ echo "$INIT_OUT" | grep -q "CASAN initialized" \
|
||||
echo "$INIT_OUT" | grep -q "Runtime.*Managed" \
|
||||
&& pass "init output clearly identifies managed runtime and path" \
|
||||
|| fail "init output hides runtime placement ($INIT_OUT)"
|
||||
if echo "$INIT_OUT" | grep -q "✗"; then
|
||||
fail "init output shows a false integration failure ($INIT_OUT)"
|
||||
else
|
||||
pass "optional integrations use a neutral status instead of a false failure"
|
||||
fi
|
||||
if echo "$INIT_OUT" | head -1 | grep -q '^[[:space:]]*{'; then
|
||||
fail "init still defaults to raw JSON"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user