doc: add a unit test for has_prefix

Pull request from Nitdoc