test copy_terms_in_function for complete functions