~ubuntu-branches/ubuntu/natty/gnome-keyring/natty

« back to all changes in this revision

Viewing changes to daemon/control/tests/test-control-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-02-16 19:00:06 UTC
  • mfrom: (1.1.58 upstream)
  • Revision ID: james.westby@ubuntu.com-20100216190006-cqpnic4zxlkmmi0o
Tags: 2.29.90git20100218-0ubuntu1
Updated to a git snapshot version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "control/gkd-control.h"
 
3
#include "tests/gtest-helpers.h"
 
4
 
 
5
#include <pwd.h>
 
6
#include <stdlib.h>
 
7
#include <unistd.h>
 
8
 
 
9
static int
 
10
run (void)
 
11
{
 
12
        const char *directory;
 
13
        const gchar *env[] = { NULL };
 
14
        gchar **envp, **e;
 
15
 
 
16
        directory = g_getenv ("GNOME_KEYRING_CONTROL");
 
17
        g_return_val_if_fail (directory, 1);
 
18
 
 
19
        envp = gkd_control_initialize (directory, "pkcs11,ssh,secret", env);
 
20
        if (envp == NULL)
 
21
                return 1;
 
22
 
 
23
        for (e = envp; *e; ++e)
 
24
                g_printerr ("%s\n", *e);
 
25
        g_strfreev (envp);
 
26
 
 
27
        return 0;
 
28
}
 
29
 
 
30
#include "tests/gtest-helpers.c"