summaryrefslogtreecommitdiffstats
path: root/lib/tests/test_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/test_utils.c')
-rw-r--r--lib/tests/test_utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c
index 057c484..763392a 100644
--- a/lib/tests/test_utils.c
+++ b/lib/tests/test_utils.c
@@ -32,6 +32,7 @@ main (int argc, char **argv)
32 state_key *temp_state_key = NULL; 32 state_key *temp_state_key = NULL;
33 state_data *temp_state_data; 33 state_data *temp_state_data;
34 time_t current_time; 34 time_t current_time;
35 char *temp_filename;
35 36
36 plan_tests(81+23); 37 plan_tests(81+23);
37 38
@@ -259,10 +260,15 @@ main (int argc, char **argv)
259 temp_string = np_state_generate_key(argv); 260 temp_string = np_state_generate_key(argv);
260 ok(!strcmp(temp_string, "Ahash"), "Got hash" ); 261 ok(!strcmp(temp_string, "Ahash"), "Got hash" );
261 262
263 temp_string = _np_state_calculate_location_prefix();
264 ok(!strcmp(temp_string, NP_SHAREDSTATE_DIR), "Got default directory" );
265
262 ok(temp_state_key==NULL, "temp_state_key initially empty"); 266 ok(temp_state_key==NULL, "temp_state_key initially empty");
263 temp_state_key = np_state_init("check_test", temp_string, 54); 267 temp_state_key = np_state_init("check_test", temp_string, 54);
264 ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); 268 ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" );
265 ok( !strcmp(temp_state_key->name, temp_string), "Got key name" ); 269 ok( !strcmp(temp_state_key->name, temp_string), "Got key name" );
270 printf("Filename=%s\n", temp_state_key->_filename);
271
266 ok( !strcmp(temp_state_key->_filename, "Tobedone"), "Got internal filename" ); 272 ok( !strcmp(temp_state_key->_filename, "Tobedone"), "Got internal filename" );
267 ok( temp_state_key->data_version==54, "Version set" ); 273 ok( temp_state_key->data_version==54, "Version set" );
268 274