summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2011-03-04 15:13:12 -0800
committerDan Fandrich <dan@coneharvesters.com>2011-03-04 15:13:12 -0800
commit80225b08cdda44cf1a764361131eef122f8c9451 (patch)
treef147a41dde1327945f485ca999f16f28e3b8ffbf /tests
parentbfc491a2d238e141872d1266a65121e1309c1e7c (diff)
downloadcurl-80225b08cdda44cf1a764361131eef122f8c9451.tar.gz
Added unit test 1306 so tests 558 & 559 are now fully replaced
Diffstat (limited to 'tests')
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test13056
-rw-r--r--tests/data/test130630
-rw-r--r--tests/unit/unit1305.c23
4 files changed, 49 insertions, 12 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 2967e7cf6..c925d0ee0 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 4efe321e1..91149b3ad 100644
--- a/tests/data/test1305
+++ b/tests/data/test1305
@@ -1,4 +1,5 @@
<testcase>
+<!-- This replaces test 558 -->
<info>
<keywords>
unittest
@@ -16,11 +17,14 @@ none
unittest
</features>
<name>
-internal hash create/add/destroy testing
+internal hash create/destroy testing
</name>
<tool>
unit1305
</tool>
+<command>
+1305
+</command>
</client>
</testcase>
diff --git a/tests/data/test1306 b/tests/data/test1306
new file mode 100644
index 000000000..b490efb51
--- /dev/null
+++ b/tests/data/test1306
@@ -0,0 +1,30 @@
+<testcase>
+<!-- This replaces test 559 -->
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal hash create/add/destroy testing
+ </name>
+<tool>
+unit1305
+</tool>
+<command>
+1306
+</command>
+</client>
+
+</testcase>
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
index bcf7c43ff..ab41a7dc5 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