The CLIC Test Facility (CTF) is a prototype two-beam accelerator, in which a high-current "drive beam" is used to generate the RF power for the main-beam accelerator. The drive-beam accelerator consists of two S-band structures which accelerate a bunch train with a total charge of 500 nC. The substantial beam loading is compensated by operating the two accelerating structures at 7.81 MHz above and below the bunch repetition frequency, respectively. This introduces a change of RF phase from bunch to bunch, which leads, together with off-crest injection into the accelerator, to an approximate compensation of the beam loading. Due to the sinusoidal time-dependency of the RF field, an energy spread of about 7% remains in the bunch train. A set of idler cavities has been installed to reduce this residual energy spread further. In this paper, the considerations that motivated the choice of the parameters of the beam-loading compensation system, together with the experimental results, are presented