Fix printvideo regression and minor improvements

This commit is contained in:
Justine Tunney 2020-08-26 09:41:07 -07:00
parent eb4bb43275
commit e86cff8ba0
25 changed files with 240 additions and 207 deletions

View file

@ -19,6 +19,7 @@
*/
#include "libc/bits/bits.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h"
@ -73,3 +74,8 @@ TEST(strwidth, testTextDelimitingControlCodes_dontHaveSubstance) {
EXPECT_EQ(0, strwidth("\0"));
EXPECT_EQ(0, strwidth("\1"));
}
BENCH(wcwidth, bench) {
volatile int x;
EZBENCH2("wcwidth", donothing, x = wcwidth(VEIL("r", u'')));
}