LCOV - GNU Libidn - tests/tst_badutf8nfkc.c

LCOV - code coverage report
Current view: top level - tests - tst_badutf8nfkc.c (source / functions) Hit Total Coverage
Test: GNU Libidn Lines: 7 7 100.0 %
Date: 2020年07月22日 17:53:13 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

 Line data Source code
 1  : /* tst_badutf8nfkc.c --- Self tests for malformed UTF-8 NFKC input.
 2  : * Copyright (C) 2016-2020 Simon Josefsson
 3  : *
 4  : * This file is part of GNU Libidn.
 5  : *
 6  : * This program is free software: you can redistribute it and/or modify
 7  : * it under the terms of the GNU General Public License as published by
 8  : * the Free Software Foundation, either version 3 of the License, or
 9  : * (at your option) any later version.
 10  : *
 11  : * This program is distributed in the hope that it will be useful,
 12  : * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 14  : * GNU General Public License for more details.
 15  : *
 16  : * You should have received a copy of the GNU General Public License
 17  : * along with this program. If not, see <http://www.gnu.org/licenses/>.
 18  : *
 19  : */
 20  : 
 21  : #ifdef HAVE_CONFIG_H
 22  : # include "config.h"
 23  : #endif
 24  : 
 25  : #include <string.h>
 26  : #include <stdlib.h>
 27  : 
 28  : #include <stringprep.h>
 29  : 
 30  : #include "utils.h"
 31  : 
 32  : void
 33  1 : doit (void)
 34  : {
 35  1 : char *badutf8 = strdup ("\xe4");
 36  1 : char *s = NULL;
 37  : 
 38  1 : s = stringprep_utf8_nfkc_normalize (badutf8, -1);
 39  1 : free (s);
 40  1 : free (badutf8);
 41  1 : }

Generated by: LCOV version 1.13

AltStyle によって変換されたページ (->オリジナル) /