Set Nautilus-Actions as being the actual official product name
[nautilus-actions.git] / src / test / test-parse-uris.c
blobd3643fa4a1ce04c85adce1aec3436df199052ffc
1 /*
2 * Nautilus-Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifdef HAVE_CONFIG_H
32 #include <config.h>
33 #endif
35 #include <glib-object.h>
36 #include <glib/gprintf.h>
37 #include <stdlib.h>
39 #include <core/na-gnome-vfs-uri.h>
41 static const gchar *uris[] = {
42 "http://robert:azerty01@mon.domain.com/path/to/a/document?query#anchor",
43 "ssh://pwi.dyndns.biz:2207",
44 "sftp://kde.org:1234/pub/kde",
45 "/usr/bin/nautilus-actions-config-tool",
46 "file:///home/pierre/data/eclipse/nautilus-actions/AUTHORS",
47 NULL
50 int
51 main( int argc, char** argv )
53 int i;
55 g_type_init();
56 g_printf( "URIs parsing test.\n\n" );
58 for( i = 0 ; uris[i] ; ++i ){
59 NAGnomeVFSURI *vfs = g_new0( NAGnomeVFSURI, 1 );
60 na_gnome_vfs_uri_parse( vfs, uris[i] );
61 g_printf( "original uri=%s\n", uris[i] );
62 g_printf( "vfs path=%s\n", vfs->path );
63 g_printf( "vfs scheme=%s\n", vfs->scheme );
64 g_printf( "vfs host_name=%s\n", vfs->host_name );
65 g_printf( "vfs host_port=%d\n", vfs->host_port );
66 g_printf( "vfs user_name=%s\n", vfs->user_name );
67 g_printf( "vfs password=%s\n", vfs->password );
68 g_printf( "\n" );
71 return( EXIT_SUCCESS );