Add test for function extractname