mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
harness: Truncate messages to one line
This commit is contained in:
parent
4a93d92095
commit
e701ba4d43
1 changed files with 7 additions and 2 deletions
|
@ -1,10 +1,15 @@
|
|||
function _oneline(x) {
|
||||
var i = x.indexOf("\n");
|
||||
return (i == -1) ? x : (x.slice(0, i) + "...");
|
||||
}
|
||||
|
||||
function _fail(s, m) {
|
||||
// string split to avoid problems with tests that end up printing the value of window._fail.
|
||||
window.alert("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m);
|
||||
window.alert(_oneline("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m));
|
||||
}
|
||||
|
||||
function _pass(s, m) {
|
||||
window.alert("TEST-PASS | " + s + ": " + m);
|
||||
window.alert(_oneline("TEST-PASS | " + s + ": " + m));
|
||||
}
|
||||
|
||||
function is(a, b, c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue