Beginnings of test_embed_record
[yaz-moved-to-github.git] / test / test_embed_record.c
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) 1995-2012 Index Data
3  * See the file LICENSE for details.
4  */
5 #if HAVE_CONFIG_H
6 #include <config.h>
7 #endif
8
9 #include <yaz/record_conv.h>
10 #include <yaz/test.h>
11 #include <yaz/wrbuf.h>
12 #include <string.h>
13 #include <yaz/log.h>
14
15 #if YAZ_HAVE_XML2
16
17 #include <yaz/base64.h>
18
19 #include <libxml/parser.h>
20 #include <libxml/tree.h>
21
22 void test(void)
23 {
24     char sample_rec[] = "MTIzNAo=";
25     char out_rec[10];
26     yaz_base64decode(sample_rec, out_rec);
27     YAZ_CHECK(strcmp(out_rec, "1234\n") == 0);
28 }
29 #endif
30
31 int main(int argc, char **argv)
32 {
33     YAZ_CHECK_INIT(argc, argv);
34     YAZ_CHECK_LOG();
35 #if YAZ_HAVE_XML2
36     test();
37 #endif
38     YAZ_CHECK_TERM;
39 }
40
41
42 /*
43  * Local variables:
44  * c-basic-offset: 4
45  * c-file-style: "Stroustrup"
46  * indent-tabs-mode: nil
47  * End:
48  * vim: shiftwidth=4 tabstop=8 expandtab
49  */
50