
#include "sphia-test.h"

// See #51
static void
test_clear_similar_keys() {
  sphia_set(sphia, "key-1", "hello world");
  sphia_set(sphia, "key-10", "hello world");
  sphia_set(sphia, "00000000", "hello world");
  sphia_set(sphia, "000000000", "hello world");
  assert(4 == sphia_count(sphia));
  assert(0 == sphia_clear(sphia));
  assert(0 == sphia_count(sphia));
}

TEST(test_clear_similar_keys);


#include "sphia-test.h"

// See #51
static void
test_clear_similar_keys() {
  sphia_set(sphia, "key-1", "hello world");
  sphia_set(sphia, "key-10", "hello world");
  assert(2 == sphia_count(sphia));
  assert(0 == sphia_clear(sphia));
  assert(0 == sphia_count(sphia));
}

TEST(test_clear_similar_keys);

--- 
+++ 
@@ -6,7 +6,9 @@
 test_clear_similar_keys() {
   sphia_set(sphia, "key-1", "hello world");
   sphia_set(sphia, "key-10", "hello world");
-  assert(2 == sphia_count(sphia));
+  sphia_set(sphia, "00000000", "hello world");
+  sphia_set(sphia, "000000000", "hello world");
+  assert(4 == sphia_count(sphia));
   assert(0 == sphia_clear(sphia));
   assert(0 == sphia_count(sphia));
 }
Update clear test to use keys longer than 8 chars
