This paper introduces a new test for goodness-of-fit based on the Gini index which is the sum over all pairs, of the absolute differences of the observed spacings. We derive its exact and asymptotic distributions under the null hypothesis, after showing that it is distributionally equivalent to the sum of uniform observations on the unit interval. After a discussion of local powers of this and related tests, we provide simulated power comparisons, which demonstrate that the Gini test is better than all the other competitors considered, against a wide variety of alternatives. © 2004 Elsevier B.V. All rights reserved.