mirror of
https://github.com/janet-lang/janet
synced 2026-09-06 17:39:11 +00:00
Remove extra output from peg test.
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user