diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 2967e7cf61998d98e91a0ca7a0402f17e60bc119..c925d0ee04919fb4f38f01088d4fb0da0ab575da 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -70,7 +70,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \ test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \ test1303 test320 test321 test322 test323 test324 test1121 test581 test580 \ - test1304 test1305 + test1304 test1305 test1306 filecheck: @mkdir test-place; \ diff --git a/tests/data/test1305 b/tests/data/test1305 index 4efe321e11e0d02c9d26669ff55d6b932529c41f..91149b3ad57461de3999af6cd9ebf1cf3468a668 100644 --- a/tests/data/test1305 +++ b/tests/data/test1305 @@ -1,4 +1,5 @@ + unittest @@ -16,11 +17,14 @@ none unittest -internal hash create/add/destroy testing +internal hash create/destroy testing unit1305 + +1305 + diff --git a/tests/data/test1306 b/tests/data/test1306 new file mode 100644 index 0000000000000000000000000000000000000000..b490efb51bab704ba4568a2dcaa46be973e0ce7d --- /dev/null +++ b/tests/data/test1306 @@ -0,0 +1,30 @@ + + + + +unittest +hash + + + +# +# Client-side + + +none + + +unittest + + +internal hash create/add/destroy testing + + +unit1305 + + +1306 + + + + diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index bcf7c43ffcde50c466abee9609d3b8b44579c71d..ab41a7dc54c60aab52f92a94a5099543c15d41cf 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -117,15 +117,18 @@ UNITTEST_START struct Curl_dns_entry *nodep; size_t key_len; - CURLcode rc = create_node(); - abort_unless(rc == CURLE_OK, "data node creation failed"); - key_len = strlen(data_key); - - nodep = Curl_hash_add(hp, data_key, key_len+1, data_node); - abort_unless(nodep, "insertion into hash failed"); - /* Freeing will now be done by Curl_hash_destroy */ - data_node = NULL; - - /* To do: test retrieval, deletion, edge conditions */ + /* Test 1305 exits without adding anything to the hash */ + if (strcmp(arg, "1305") != 0) { + CURLcode rc = create_node(); + abort_unless(rc == CURLE_OK, "data node creation failed"); + key_len = strlen(data_key); + + nodep = Curl_hash_add(hp, data_key, key_len+1, data_node); + abort_unless(nodep, "insertion into hash failed"); + /* Freeing will now be done by Curl_hash_destroy */ + data_node = NULL; + + /* To do: test retrieval, deletion, edge conditions */ + } UNITTEST_STOP