Sha256: e3190237bc86d75ae7a0a10a54f757c7917803141ab93a44dceae562186627a2
Contents?: true
Size: 807 Bytes
Versions: 2
Compression:
Stored size: 807 Bytes
Contents
#include <glib.h> #include <lsmstr.h> #include <lsm.h> static void str_consolidate_test (void) { char *string; string = g_strdup (" consolidate \n \t test \t \r a b c \n "); lsm_str_consolidate (string); g_assert_cmpstr (string, ==, "consolidate test a b c"); g_free (string); string = g_strdup (" "); lsm_str_consolidate (string); g_assert_cmpstr (string, ==, ""); g_free (string); string = g_strdup (""); lsm_str_consolidate (string); g_assert_cmpstr (string, ==, ""); g_free (string); string = NULL; lsm_str_consolidate (string); g_assert (string == NULL); } int main (int argc, char *argv[]) { int result; g_test_init (&argc, &argv, NULL); g_test_add_func ("/str/str-consolidate", str_consolidate_test); result = g_test_run(); lsm_shutdown (); return result; }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mathematical-1.6.20 | ext/mathematical/lasem/tests/str.c |
mathematical-1.6.18 | ext/mathematical/lasem/tests/str.c |