Branch Coverage

secret_buffer_console.c
Criterion Covered Total %
branch 21 54 38.8


line true false branch
49 0 0 && sb_console_state_get_echo(&cstate)
50 0 22 && sb_console_state_set_echo(&cstate, false);
0 0 && sb_console_state_set_echo(&cstate, false);
58 5 200 if (got <= 0)
61 196 4 if (*eol == '\r' || *eol == '\n') {
13 183 if (*eol == '\r' || *eol == '\n') {
68 4 13 if (*eol == '\r' && !is_console) {
4 0 if (*eol == '\r' && !is_console) {
69 4 0 if (secret_buffer_append_read(buf, stream, 1) > 0) {
71 0 4 if (*eol != '\n') {
72 0 0 if (PerlIO_ungetc(stream, *eol) == EOF)
82 0 22 if (console_changed)
128 0 0 if (cs)
234 44 0 state->fd= stream? PerlIO_fileno(stream) : -1;
235 4 40 if (state->fd < 0)
239 40 0 if (tcgetattr(state->fd, &state->orig_state) != 0)
249 0 0 if (!state->own_fd) {
251 0 0 if (new_fd < 0)
266 0 0 : (new_st.c_lflag & ~ECHO);
267 0 0 if (tcsetattr(state->fd, TCSANOW, &new_st) == 0) {
283 0 0 : ((new_st.c_lflag & ~(tcflag_t)ICANON) | ISIG);
284 0 0 if (tcsetattr(state->fd, TCSANOW, &new_st) == 0) {
296 20 2 if (state->fd >= 0) {
297 0 20 if (state->auto_restore)
298 0 0 if (!sb_console_state_restore(state))
300 0 20 if (state->own_fd)
301 0 0 if (close(state->fd) < 0)