1a4e54154Smrg/* 2a4e54154Smrg * fontconfig/test/test-bz1744377.c 3a4e54154Smrg * 4a4e54154Smrg * Copyright © 2000 Keith Packard 5a4e54154Smrg * 6a4e54154Smrg * Permission to use, copy, modify, distribute, and sell this software and its 7a4e54154Smrg * documentation for any purpose is hereby granted without fee, provided that 8a4e54154Smrg * the above copyright notice appear in all copies and that both that 9a4e54154Smrg * copyright notice and this permission notice appear in supporting 10a4e54154Smrg * documentation, and that the name of the author(s) not be used in 11a4e54154Smrg * advertising or publicity pertaining to distribution of the software without 12a4e54154Smrg * specific, written prior permission. The authors make no 13a4e54154Smrg * representations about the suitability of this software for any purpose. It 14a4e54154Smrg * is provided "as is" without express or implied warranty. 15a4e54154Smrg * 16a4e54154Smrg * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 17a4e54154Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 18a4e54154Smrg * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 19a4e54154Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20a4e54154Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 21a4e54154Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 22a4e54154Smrg * PERFORMANCE OF THIS SOFTWARE. 23a4e54154Smrg */ 24a4e54154Smrg#include <fontconfig/fontconfig.h> 25a4e54154Smrg 26a4e54154Smrgint 27a4e54154Smrgmain (void) 28a4e54154Smrg{ 29a4e54154Smrg const FcChar8 *doc = (const FcChar8 *) "" 30a4e54154Smrg "<fontconfig>\n" 31a4e54154Smrg " <include ignore_missing=\"yes\">blahblahblah</include>\n" 32a4e54154Smrg "</fontconfig>\n" 33a4e54154Smrg ""; 34a4e54154Smrg const FcChar8 *doc2 = (const FcChar8 *) "" 35a4e54154Smrg "<fontconfig>\n" 36a4e54154Smrg " <include ignore_missing=\"no\">blahblahblah</include>\n" 37a4e54154Smrg "</fontconfig>\n" 38a4e54154Smrg ""; 39a4e54154Smrg FcConfig *cfg = FcConfigCreate (); 40a4e54154Smrg 41a4e54154Smrg if (!FcConfigParseAndLoadFromMemory (cfg, doc, FcTrue)) 42a4e54154Smrg return 1; 43a4e54154Smrg if (FcConfigParseAndLoadFromMemory (cfg, doc2, FcTrue)) 44a4e54154Smrg return 1; 45a4e54154Smrg if (!FcConfigParseAndLoadFromMemory (cfg, doc2, FcFalse)) 46a4e54154Smrg return 1; 47a4e54154Smrg 48a4e54154Smrg FcConfigDestroy (cfg); 49a4e54154Smrg 50a4e54154Smrg return 0; 51a4e54154Smrg} 52