There is a growing literature documenting that the persistence of time series may change over time, and as a consequence, shifts in the long-run equilibrium of macroeconomic variables are expected. An important example is the significant increase in public debt in certain periods of time due to increases in government expenditures which are not matched by revenue counterparts. In this paper, new residual-based Wald-type tests are proposed which are designed to detect segmented cointegration, i.e., subsamples during which equilibrium relations exist. We derive the asymptotic properties of the tests, tabulate critical values for models with different deterministic components, and show by simulations that the tests display good finite sample performance in many relevant setups. Our empirical application provides a thorough examination of the main components of US governments' budgets at two administrative levels (Federal, and State and Local) and concludes that until Bill Clinton's presidency government budgets components never moved together.