• R/O
  • HTTP
  • SSH
  • HTTPS

transunit: Commit

Transunit repository


Commit MetaInfo

Revision73a6dff05726ef57ad20d18bccdd29af6bb62905 (tree)
Zeit2019-05-13 10:39:06
AutorAlaskanEmily <yoloshart@gmai...>
CommiterAlaskanEmily

Log Message

Fix message printing on test failure with multi-line results

Ändern Zusammenfassung

Diff

--- a/transunit.m
+++ b/transunit.m
@@ -119,19 +119,22 @@ run_test(Pred, Name, !IO) :-
119119 ( Pred(unit.unit) -> Result = success_message ; Result = failure_message ),
120120 io.write_string(Result, !IO),
121121 io.write_char((' '), !IO),
122- io.write_line(Name, !IO).
122+ io.write_string(Name, !IO),
123+ io.nl(!IO).
123124
124125 %-----------------------------------------------------------------------------%
125126
126127 run_result_test(Pred, Name, !IO) :-
127128 Pred(Result, !IO),
128- io.write_line(test_result(Result, Name), !IO).
129+ io.write_string(test_result(Result, Name), !IO),
130+ io.nl(!IO).
129131
130132 %-----------------------------------------------------------------------------%
131133
132134 run_result_test(Pred, Name, !State, !IO) :-
133135 Pred(Result, !State),
134- io.write_line(test_result(Result, Name), !IO).
136+ io.write_string(test_result(Result, Name), !IO),
137+ io.nl(!IO).
135138
136139 %-----------------------------------------------------------------------------%
137140
Show on old repository browser