fix print-fn detection in test