This is an action in assumpsit. .'The complaint contains only common counts, — 1st, on open *183account; 2d, on account stated; 3d, for goods, wares, and merchandise sold to the defendant. The defendant pleaded the general issue, and six special pleas. Demurrers were sustained to the special pleas, after which the defendant filed six amended special pleas. Those of the amended special pleas numbered 2, 3, 4, and 5, were stricken on motion of the plaintiffs, and demurrers were sustained to- numbers 1 and 6. These special pleas both as originally filed and as amended attempted to set up in defense of plaintiff’s action an express contract between the parties and a breach of the same by the plaintiffs. In none of these special pleas, is the cause of action as laid in the complaint denied, and as a defense to the action they are in other respects fatally defective for want of proper averments. That a party may not purchase and retain the goods of another, and when sued for their value set up a breach of contract in the sale and purchase to defeat payment, is a proposition of law too well settled to call for discussion or citation of authorities. To permit such would be in disregard of the plainest principles of common justice. The purchaser may, however, where there is a special contract of sale, and the contract has been breached by the seller, to the injury and damage of the purchaser, set up- the contract and its breach and thé damages sustained resulting as a proximate -consequence of such breach, by- way of recoupment to the claim for the value of the goods. In the present suit the defendant did not by his pleas undertake to do this, but sets up a contract and its breach as a bar to plaintiff’s right of action. The suit here is not one as appellant’s^ counsel seems to think, of an action on an express contract to recover damages for its breach, and to such effect are the cases and authorities cited in brief of counsel, but is an action on the common counts for goods, wares and merchandise sold, the measure of damages being the value of such goods. The special pleas were otherwise defective as to indefiniteness and uncertainty in their averments, and open to some of the grounds of demurrer in that respect. Those numbered from 2 to 6, inclusive, -are so palpably wanting in necessary averments to- constitute a defense to plaintiff’s *184action, as. to require no particular comment in pointing out their defects. There was no- error in sustaining the demurrers to- the special pleas both as originally filed and as amended.
As shown by the bill of exceptions, the court on motion of the 'plaintiffs struck from the files amended special pleas 2, 3; 4, and 5, to which ruling of the court, the defendant duly excepted. Unless.it can be said of these pleas, that they were either frivolous, irrelevant, or prolix, then the court erred in striking them on motion, and this we think cannot be said. They are not prolix, and if it were intended to- plead a set-off, or to set up a claim by way of recoupment, against the plaintiff’s demand, as the averments of some of them s.eem to indicate, though defective, they could not be considered as either frivolous or irrelevant. The sufficiency of a plea must be tested on demurrer. By demurrer the defects are pointed out, affording the pleader an opportunity-to cure the same by arnendni-ent, and of this he is deprived by a motion to strike. See Troy Fertilizer Co. v. State of Ala., 134 Ala. 333; 32 So. Rep. 618; Brooks v. Continental Ins. Co., 125 Ala. 615; Murphy v. Farley, 124 Ala. 279; Williamson v. Mayer, 117 Ala. 253; Ala. Great So. R. R. Co. v. Clark, 136 Ala. 450; Code, § 3286.
. There are other asisgnments of error relating to the rulings of the court on the admission of testimony, but ah no notice is taken of these.assignments, in argument and brief of counsel, they .will be regarded here as having been waived.
For the error pointed out, the judgment will be reversed and the cause remanded.