test: no extra new line in skipped test output
Removes extra empty line when a test was skipped. PR-URL: https://github.com/libuv/libuv/pull/1616 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
e7f4e9ecca
commit
96ea5ac96d
@ -130,6 +130,7 @@ void log_tap_result(int test_count,
|
||||
const char* result;
|
||||
const char* directive;
|
||||
char reason[1024];
|
||||
int reason_length;
|
||||
|
||||
switch (status) {
|
||||
case TEST_OK:
|
||||
@ -147,6 +148,9 @@ void log_tap_result(int test_count,
|
||||
|
||||
if (status == TEST_SKIP && process_output_size(process) > 0) {
|
||||
process_read_last_line(process, reason, sizeof reason);
|
||||
reason_length = strlen(reason);
|
||||
if (reason_length > 0 && reason[reason_length - 1] == '\n')
|
||||
reason[reason_length - 1] = '\0';
|
||||
} else {
|
||||
reason[0] = '\0';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user