  We study a fluid of two-dimensional parallel hard squares in bulk and under
confinement in channels, with the aim of evaluating the performance of
Fundamental-Measure Theory (FMT). To this purpose, we first analyse the phase
behaviour of the bulk system using FMT and Percus-Yevick theory, and compare
the results with MD and MC simulations. In a second step, we study the confined
system and check the results against those obtained from Transfer Matrix Method
and from our own Monte Carlo simulations. Squares are confined to channels with
parallel walls at angles of 0$^{\circ}$ or 45$^{\circ}$ relative to the
diagonals of the parallel hard squares, respectively, which allows for an
assessment of the effect of the external-potential symmetry on the fluid
structural properties. In general FMT overestimates bulk correlations,
predicting the existence of a columnar phase (absent in simulations) prior to
crystallisation. The equation of state predicted by FMT compares well with
simulations, although the PY approach with the virial route is better in some
range of packing fractions. The FMT is highly accurate for the structure and
correlations of the confined fluid due to the dimensional crossover property
fulfilled by the theory. Both density profiles and equations of state of the
confined system are accurately predicted by the theory. The highly non-uniform
pair correlations inside the channel are also very well described by FMT.
