High-brightness electron bunches, such as those generated and accelerated in free-electron lasers (FELs), can develop small-scale structure in the longitudinal phase space. This causes variations in the slice energy spread and current profile of the bunch which then undergo amplification, in an effect known as the microbunching instability. By imposing energy spread modulations on the bunch in the low-energy section of an accelerator, using an undulator and a modulated laser pulse in the centre of a dispersive chicane, it is possible tomanipulate the bunch longitudinal phase space. This allows for the control and study of the instability in unprecedented detail. We report measurements and analysis of such modulated electron bunches in the 2Dspectro-temporal domain at the FERMI FEL, for three different bunch compression schemes. We also perform corresponding simulations of these experiments and show that the codes are indeed able to reproduce the measurements across a wide spectral range. This detailed experimental verification of the ability of codes to capture the essential beam dynamics of the microbunching instability will benefit the design and performance of future FELs.