"get var" on the CLI was also missing an LF, and the vtest as well, so
that fixing only the code breaks the vtest. This must be backported to
2.4 as the issue was brought with commit
c35eb38f1d ("MINOR: vars/cli:
add a "get var" CLI command to retrieve global variables").
haproxy h1 -cli {
send "get var proc.int5"
- expect ~ "^proc.int5: type=sint value=<5>$"
+ expect ~ "^proc.int5: type=sint value=<5>"
}
client c1 -connect ${h1_fe1_sock} {
haproxy h1 -cli {
send "get var proc.int5"
- expect ~ "^proc.int5: type=sint value=<10>$"
+ expect ~ "^proc.int5: type=sint value=<10>"
}
client c2 -connect ${h1_fe1_sock} {
haproxy h1 -cli {
send "get var proc.int5"
- expect ~ "^proc.int5: type=sint value=<20>$"
+ expect ~ "^proc.int5: type=sint value=<20>"
}
haproxy h1 -cli {
if (!sample_casts[smp.data.type][SMP_T_STR] ||
!sample_casts[smp.data.type][SMP_T_STR](&smp)) {
- chunk_appendf(&trash, "(undisplayable)");
+ chunk_appendf(&trash, "(undisplayable)\n");
} else {
/* Display the displayable chars*. */
b_putchr(&trash, '<');
b_putchr(&trash, '.');
}
b_putchr(&trash, '>');
+ b_putchr(&trash, '\n');
b_putchr(&trash, 0);
}
return cli_msg(appctx, LOG_INFO, trash.area);