Update of /cvsroot/simplemail/simplemail/tests
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18185/tests
Modified Files:
imap2_unittest.c
Log Message:
Use realpath only to get the current directory.
Before, an entry within the current directory was used, which however, didn't need to exist.
Index: imap2_unittest.c
===================================================================
RCS file: /cvsroot/simplemail/simplemail/tests/imap2_unittest.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- imap2_unittest.c 24 Dec 2013 09:32:10 -0000 1.20
+++ imap2_unittest.c 26 Dec 2013 18:37:28 -0000 1.21
@@ -168,15 +168,19 @@
struct account *ac;
struct folder *f;
- char *imap_profile;
+ char *imap_profile_path;
+ char *pwd;
debug_init();
debug_set_level(25);
- imap_profile = realpath("imap-profile", NULL);
- CU_ASSERT(imap_profile != NULL);
+ pwd = realpath(".", NULL);
+ CU_ASSERT(pwd != NULL);
- config_set_user_profile_directory(imap_profile);
+ imap_profile_path = mycombinepath(pwd, "imap-profile");
+ CU_ASSERT(imap_profile_path != NULL);
+
+ config_set_user_profile_directory(imap_profile_path);
CU_ASSERT(codesets_init() != 0);
@@ -227,7 +231,8 @@
progmon_deinit();
codesets_cleanup();
- free(imap_profile);
+ free(imap_profile_path);
+ free(pwd);
}
/*************************************************************/
|