]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make conf_read_valid_config work on systems that don't export $USER
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Mar 2012 21:10:57 +0000 (22:10 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Mar 2012 21:10:57 +0000 (22:10 +0100)
test/test_conf.c

index db1f381ec39aa5698f5d6f2e2b81ff8c82becaea..711458a3aa34f44c969d412a98dac6af8dd25f7e 100644 (file)
@@ -84,8 +84,9 @@ TEST(conf_read_valid_config)
 {
        struct conf *conf = conf_create();
        char *errmsg;
+       putenv("USER=rabbit");
        const char *user = getenv("USER");
-       CHECK(user);
+       CHECK_STR_EQ("rabbit", user);
        create_file(
                "ccache.conf",
                "base_dir =  /$USER/foo/${USER} \n"