diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 19:52:37 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 19:52:37 -0500 |
| commit | dd2de3166653c1bf0d33d5872791ae6fbe8e2998 (patch) | |
| tree | e7a8818fa1e7663dd8b921440a32e8ed1e6148df /builtins/functions.c | |
| parent | a09a8339e78923688440e6b303e49eb7c6a02b29 (diff) | |
Fix up USE_COLOR
Diffstat (limited to 'builtins/functions.c')
| -rw-r--r-- | builtins/functions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index f2b2fa82..03dfe738 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -90,7 +90,7 @@ public CORD generic_as_str(const void *obj, bool colorize, const TypeInfo *type) case TypeInfoInfo: return Type__as_str(obj, colorize, type); case CustomInfo: if (!type->CustomInfo.as_str) - builtin_fail("No cord function provided for type!\n"); + fail("No cord function provided for type!\n"); return type->CustomInfo.as_str(obj, colorize, type); default: errx(1, "Invalid type tag: %d", type->tag); } @@ -146,8 +146,8 @@ public void __doctest(CORD label, void *expr, TypeInfo *type, CORD expected, con if (!success) { if (filename && file) fprint_span(stderr, file, file->text+start, file->text+end, "\x1b[31;1m", 2, USE_COLOR); - builtin_fail(USE_COLOR ? "\x1b[31;1mExpected: \x1b[32;7m%s\x1b[0m\n\x1b[31;1m But got: \x1b[31;7m%s\x1b[0m\n" : "Expected: %s\n But got: %s\n", - expected, expr_str); + fail(USE_COLOR ? "\x1b[31;1mExpected: \x1b[32;7m%s\x1b[0m\n\x1b[31;1m But got: \x1b[31;7m%s\x1b[0m\n" : "Expected: %s\n But got: %s\n", + expected, expr_str); } } } |
