tests: use string length without sizeof.