Add a test for chardetect