Remove extra output from peg test.

This commit is contained in:
Calvin Rose
2026-02-06 00:23:45 -06:00
parent d2685594f9
commit c7c3821aa6
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ tail:
char buffer[32] = {0};
size_t len = (size_t)(s->outer_text_end - text);
memcpy(buffer, text, (len > 31 ? 31 : len));
janet_eprintf("?? at [%s] (index %D)\n", buffer, (int64_t)(text - s->text_start));
janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
int has_color = janet_truthy(janet_dyn("err-color"));
/* Accumulate buffer */
if (s->scratch->count) {
+4 -2
View File
@@ -853,14 +853,16 @@
# Debug and ?? tests.
(defn test-stderr [name peg input expected-matches expected-stderr]
(test name peg input expected-matches)
(with-dyns [:err @""]
(test name peg input expected-matches))
(def actual @"")
(with-dyns [:err actual *err-color* true]
(peg/match peg input))
(assert (deep= (string actual) expected-stderr)))
(defn test-stderr-no-color [name peg input expected-matches expected-stderr]
(test name peg input expected-matches)
(with-dyns [:err @""]
(test name peg input expected-matches))
(def actual @"")
(with-dyns [:err actual *err-color* false]
(peg/match peg input))