Let focus have a trailing comma.
@@ -62,6 +62,10 @@ bool check_focus() {
q++;
}
+ if (p == q) {
+ // No-op. Skip empty focus targets, which makes it convenient to
+ // copy/paste a string with a trailing comma.
+ } else {
// See if proc_funcname (with or without a "test_" or "bench_" prefix)
// starts with the [p, q) string.
if (!strncmp(proc_funcname, p, q - p)) {
@@ -77,6 +81,7 @@ bool check_focus() {
!strncmp(unprefixed_proc_funcname, p, q - p)) {
return true;
}
+ }
if (*q == '\x00') {
break;
