Git init
[pkgs/e/elektra.git] / tests / test_stream.c
1 /***************************************************************************
2  *          test_stream.c  -  streaming test suite
3  *                  -------------------
4  *  begin                : Mon 26 Nov 2007
5  *  copyright            : (C) 2007 by Markus Raab
6  *  email                : elektra@markus-raab.org
7  ****************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the BSD License (revised).                      *
13  *                                                                         *
14  ***************************************************************************/
15
16 #ifdef HAVE_CONFIG_H
17 #include "config.h"
18 #endif
19
20 #include <stdio.h>
21 #ifdef HAVE_STDLIB_H
22 #include <stdlib.h>
23 #endif
24 #ifdef HAVE_STRING_H
25 #include <string.h>
26 #endif
27
28 #include <tests.h>
29
30 void test_keyoutput ()
31 {
32         KeySet          *ks;
33         FILE *fout = stdout;
34
35         printf("Testing Read and write xml\n");
36         ks = ksNew (0);
37
38 //      fout = fopen ("key.txt", "w");
39         exit_if_fail( ksFromXMLfile(ks, srcdir_file ("key.xml")) == 0, "ksFromXMLfile(key.xml) failed.");
40 //      compare_files ("key.xml");
41
42 //      ksOutput (ks, fout, KEY_VALUE | KEY_COMMENT);
43 //      ksOutput (ks, fout, KDB_O_SHOWMETA);
44         ksOutput (ks, fout, KDB_O_SHOWFLAGS);
45         ksDel (ks);
46 }
47
48 int main()
49 {
50         printf("STREAM TESTS\n");
51         printf("==================\n\n");
52
53         init ();
54
55         test_keyoutput();
56         printf("\ntest_stream RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
57
58         return nbError;
59 }