+ /* Regex test */
+ SILC_LOG_DEBUG(("Simple regex test"));
+ s1 = "foo,bar,silc,com";
+ SILC_LOG_DEBUG(("Find 'silc' from %s", s1));
+ if (!silc_string_match(s1, "silc"))
+ goto err;
+ SILC_LOG_DEBUG(("Regex match"));
+ SILC_LOG_DEBUG(("Find 'foobar' from %s", s1));
+ if (silc_string_match(s1, "foobar"))
+ goto err;
+ SILC_LOG_DEBUG(("Regex not found (Ok)"));
+
+ /* HEX to data, data to HEX tests */
+ for (i = 0; i < sizeof(t); i++)
+ t[i] = i;
+ silc_data2hex(t, sizeof(t), h, sizeof(h));
+ silc_hex2data(h, t, sizeof(t), &len);
+ silc_snprintf(h, sizeof(h), "010203ffabdef9ab");
+ silc_hex2data(h, t, sizeof(t), &len);
+ silc_data2hex(t, sizeof(t), h, sizeof(h));
+
+ /* snprintf test */
+ silc_snprintf(str, sizeof(str), "This is %@ rendered\n",
+ render, "automatically");
+ SILC_LOG_DEBUG((str));
+ SILC_LOG_DEBUG(("This too %@ rendered", render, "is automatically"));
+