The accuracy of previously proposed potential-energy functions for diatomic molecules has been tested against known RKR and ab initio data, where these data span a large fraction of the well depth. Systematic testing has revealed several forms which are more accurate than those proposed earlier for a given number of adjustable parameters. The most accurate functions allow the Morse curvature parameter to vary with the internuclear distance. Various higher-order series are also compared with respect to accuracy and stability, leading to general recommendations for the accurate fitting of diatomic potential-energy data.