
    JOE W. TOOMES and wife, CONNIE MARIE TOOMES, petitioners, v. ROBERT F. TOOMES (single), RALPH V. TOOMES and wife, RUTH TOOMES, defendants.
    (Filed 3 May, 1961.)
    1. Pleadings § 12—
    The office of a demurrer is to test the sufficiency of a pleading, admitting for its purpose the truth of the facts alleged in the pleading.
    2. Pleadings § 15—
    Where intervenors in partition proceedings alleged that they owned an undivided interest in the land and that such interest had not been divested, demurrer to their pleading should be overruled, even though the assertion of intervenors’ title is based upon the invalidity of the former decree entered in the proceedings because of the want of proper confirmation and want of service of summons on intervenors, since whether the validity of the prior decree could be thus attacked is not presented by the demurrer, the judgment roll being referred to but not made a part of the pleading.
    3. Same—
    A. demurrer based upon facts not appearing upon the face of the pleading is a speaking demurrer, and if the matter dehors conflicts with the facts alleged the demurrer must be resolved on the basis of the pleading, without considering the extraneous matters.
    4. Judgments § 18—
    If a pleading attacks the validity of a judgment on grounds available only upon motion in the cause, the court has the discretionary power to treat the pleading as a motion in the cause and thus avoid delay.
    Appeal by intervenors from Preyer, J., November 7, 1960 Civil Term of RaNdolph.
    This is a special proceeding, instituted 4 February 1960, for sale of land for partition. The petition alleges that Joe W. Toomes, Robert F. Toomes and Ralph V. Toomes are tenants in common and own the land in the proportions one-fifth, three-fifths and one-fifth, respectively. The answer admits all the material allegations of the petition. The Clerk of Superior Court entered an order of sale 26 February 1960.
    On 25 May 1960 Claudia Rose Vestal, Betty J. Lewis, Blease Toomes, Bernard Toomes and Louise T. Rayle petitioned the court to be permitted to intervene, and the Clerk ordered that they be made parties respondent (together with their spouses), that summons be served on them and that they be permitted to answer.
    The intervenors filed answer and alleged in substance: The land should be sold for partition. Intervenors, together, own a one-tenth undivided interest in the land in question and their title “has never been divested.” A purported sale of their interest was made pursuant to an order, dated 23 March 1937, in a former special proceeding, but the order and purported sale were void and did not divest their title. The former special proceeding and the sale made pursuant thereto are invalid for several specified reasons, among them, the lack of proper confirmation and approval of the sale by the court and want of service of summons on these respondents who were then minors. Intervenors pray that they be permitted to share in the proceeds of the sale to be made in the present special proceeding.
    The original petitioners and respondents demurred to intervenors’ answer on the grounds that it shows that intervenors have no interest in the land, and the purported attack on the former special proceeding may not be pleaded in the present proceeding.
    Pending the hearings on the demurrer the land was sold and the sale confirmed. The controversy relates only to the proceeds of the sale.
    The Clerk of Superior Court sustained the demurrer. On appeal, the Judge examined the judgment in the former proceeding and sustained the demurrer and dismissed the claim of intervenors.
    Intervenors appeal and assign error.
    
      John R. Hughes and Harry Rockwell for intervenors, appellants.
    
    
      H. Wade Yates for petitioners, appellees.
    
    
      Ottway Burton for defendants, appellees.
    
   Per Cuhiam.

The office of demurrer is to test the sufficiency of a pleading, and for that purpose it admits the truth of the facts contained in the pleading. Buchanan v. Smawley, 246 N.C. 592, 595, 99 S.E. 2d 787. Applying this rule, the original parties admit, for the purpose of the demurrer, the following facts alleged: Intervenors were not served with summons in the former proceeding; the 1937 sale was not properly confirmed and approved; and intervenors have not been divested of title to their one-tenth interest in the land or its proceeds. Whether these allegations can be sustained by proof is a different matter. They are sufficient to withstand the demurrer.

The ruling of the court below was undoubtedly based on his examination and consideration of the judgment in the former proceeding. While this judgment and the judgment roll in the former proceeding were referred to and attacked by intervenors’ pleading, they were not attached to or incorporated in the pleading. “A demurrer lies only when the defect asserted as the ground of demurrer is apparent upon the face of the pleading attacked. (Citing authorities) A demurrer which requires reference to facts not appearing on the face of the pleading attacked is a ‘speaking demurrer,’ and is bad.” Construction Co. v. Electrical Workers Union, 246 N.C. 481, 488-9, 98 S.E. 2d 852. The instant case illustrates the soundness of the rule that a “speaking demurrer” is bad. If the matter dehors the pleading conflicts with the facts alleged, the court has no choice but to resolve the matter on the basis of the pleading. Extraneous matters may be considered only when the cause is heard oii the merits.

Demurrants insist that the allegations attacking the 1937 judgment and sale may only be asserted by motion in the former proceeding, and must be disregarded in the pleading to the proceeding at bar. Even so, if all reference to the former proceeding be stricken from intervenors’ answer, the pleading still alleges ownership of a one-tenth interest in the land and that it has never been divested. This, we think, is sufficient to withstand demurrer. Assuming, but not deciding, that all or a portion of intervenors’ allegations with reference to the former proceeding may only be made by motion in that cause, the court may, in its discretion, treat the answer in the present proceeding as a motion in the prior cause and thereby avoid further delay. Craddock v. Brinkley, 177 N.C. 125, 127, 98 S.E. 280.

We express no opinion on the merits.

The judgment below sustaining the demurrer and dismissing in-tervenors’ claim of interest in the proceeds of the sale of the land is

Reversed.  