diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 20:07:39 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 20:07:39 -0500 |
| commit | d0ad2c6bc134b5dc72747dce005d7ad5f44834fc (patch) | |
| tree | d4c4a9246988e5f9041bcb187effa682c917a19a | |
| parent | b34c5c57740bd819551d74554533931e89d3caf0 (diff) | |
Fix doctest color issue
| -rw-r--r-- | builtins/functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index 309ad2ab..fe30046a 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -137,7 +137,7 @@ public void __doctest(void *expr, TypeInfo *type, CORD expected, const char *fil CORD_fprintf(stderr, USE_COLOR ? "\x1b[2m=\x1b[0m %r \x1b[2m: %r\x1b[m\n" : "= %r : %r\n", expr_str, type_name); if (expected) { CORD expr_plain = USE_COLOR ? generic_as_str(expr, false, type) : expr_str; - bool success = (CORD_cmp(expr_str, expected) == 0); + bool success = (CORD_cmp(expr_plain, expected) == 0); if (!success && CORD_chr(expected, 0, ':')) { expr_plain = heap_strf("%s : %s", expr_plain, type_name); success = (CORD_cmp(CORD_catn(3, expr_plain, " : ", type_name), expected) == 0); |
