Branch Coverage

secret_buffer_console.c
Criterion Covered Total %
branch 21 54 38.8


line true false branch
52 0 0 && sb_console_state_get_echo(&cstate)
53 0 40 && sb_console_state_set_echo(&cstate, false);
0 0 && sb_console_state_set_echo(&cstate, false);
61 9 404 if (got <= 0)
64 396 8 if (*eol == '\r' || *eol == '\n') {
23 373 if (*eol == '\r' || *eol == '\n') {
71 8 23 if (*eol == '\r' && !is_console) {
8 0 if (*eol == '\r' && !is_console) {
72 8 0 if (secret_buffer_append_read(buf, stream, 1) > 0) {
74 0 8 if (*eol != '\n') {
75 0 0 if (PerlIO_ungetc(stream, *eol) == EOF)
85 0 40 if (console_changed)
131 0 0 if (cs)
347 87 0 state->fd= stream? PerlIO_fileno(stream) : -1;
348 8 79 if (state->fd < 0)
352 79 0 if (tcgetattr(state->fd, &state->orig_state) != 0)
362 0 0 if (!state->own_fd) {
364 0 0 if (new_fd < 0)
379 0 0 : (new_st.c_lflag & ~ECHO);
380 0 0 if (tcsetattr(state->fd, TCSANOW, &new_st) == 0) {
396 0 0 : ((new_st.c_lflag & ~(tcflag_t)ICANON) | ISIG);
397 0 0 if (tcsetattr(state->fd, TCSANOW, &new_st) == 0) {
409 36 4 if (state->fd >= 0) {
410 0 36 if (state->auto_restore)
411 0 0 if (!sb_console_state_restore(state))
413 0 36 if (state->own_fd)
414 0 0 if (close(state->fd) < 0)