Happy new year
[yazpp-moved-to-github.git] / src / test_gdu.cpp
1 /* This file is part of the yazpp toolkit.
2  * Copyright (C) Index Data and Mike Taylor
3  * See the file LICENSE for details.
4  */
5
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 #include <stdlib.h>
10 #include <yazpp/gdu.h>
11 #include <yaz/test.h>
12 #include <yaz/log.h>
13
14 using namespace yazpp_1;
15
16 static void tst1(void)
17 {
18     ODR odr = odr_createmem(ODR_ENCODE);
19
20     const char *url =
21         "http://localhost:9036/XXX/cproxydebug-7/node102/p/105/c=content_connector"
22         "a=usr/pw#&? r=cfusr/cfpw p=1.2.3.4:80/www.indexdata.com/staff/";
23     int use_full_host = 0;
24     Z_GDU *gdu_req = z_get_HTTP_Request_uri(odr, url, 0, use_full_host);
25
26     GDU a(gdu_req);
27     GDU b;
28
29     b = a;
30
31     odr_destroy(odr);
32 }
33
34 int main(int argc, char **argv)
35 {
36     YAZ_CHECK_INIT(argc, argv);
37     tst1();
38     YAZ_CHECK_TERM;
39 }
40
41 /*
42  * Local variables:
43  * c-basic-offset: 4
44  * c-file-style: "Stroustrup"
45  * indent-tabs-mode: nil
46  * End:
47  * vim: shiftwidth=4 tabstop=8 expandtab
48  */
49