20221212
[devspec.git] / devspec.en_US / project / recutils / torture / rec-parser / rec-parser-new-str.c
blob3f02ec3e92d59484903edbacd4d6bf8854ec11b9
1 /* -*- mode: C -*-
3 * File: rec-parser-new-str.c
4 * Date: Sat Nov 13 15:23:03 2010
6 * GNU recutils - rec_parser_new_str unit tests.
8 */
10 /* Copyright (C) 2010-2015 Jose E. Marchesi */
12 /* This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include <config.h>
27 #include <string.h>
28 #include <stdio.h>
29 #include <check.h>
31 #include <rec.h>
33 /*-
34 * Test: rec_parser_new_str_nominal
35 * Unit: rec_parser_new_str
36 * Description:
37 * + Create a rec parser.
39 START_TEST(rec_parser_new_str_nominal)
41 rec_parser_t parser;
42 char *buffer = "foo: bar";
44 parser = rec_parser_new_str (buffer, "buffer");
45 fail_if (parser == NULL);
47 rec_parser_destroy (parser);
49 END_TEST
52 * Test creation function
54 TCase *
55 test_rec_parser_new_str (void)
57 TCase *tc = tcase_create ("rec_parser_new_str");
58 tcase_add_test (tc, rec_parser_new_str_nominal);
60 return tc;
63 /* End of rec-parser-new-str.c */