fix tests, use '$first_answer' to print indentation before errors (#1408)

This commit is contained in:
Mark Thom
2022-04-09 20:32:52 -06:00
parent 00eab4d415
commit 8bf3d4ea71
6 changed files with 17 additions and 17 deletions

View File

@@ -18,7 +18,14 @@
write_error(Error) :-
write(' '),
% '$fetch_global_var' is the core system call of bb_get/2, but
% bb_get may not exist when write_error is first called, so fall
% back on '$fetch_global_var'.
( '$fetch_global_var'('$first_answer', false) ->
true
; write(' ') % if '$first_answer' isn't defined yet or true,
% print indentation.
),
( nonvar(Error),
functor(Error, error, 2) ->
writeq(Error)