Beispiel #1
0
void test_double_free_handle(void)
{
  SCM handle = cl_easy_init();
  gc_free_handle(handle);
  gc_free_handle(handle);
  gc_free_handle(handle);
}
Beispiel #2
0
void test_free_handle_empty_slist_option (SCM option)
{
  SCM handle = cl_easy_init();
  SCM str_list = scm_list_n(SCM_UNDEFINED);
  SCM ret = cl_easy_setopt(handle, scm_variable_ref(option), str_list, SCM_BOOL_F);
  gc_free_handle(handle);
}
Beispiel #3
0
void test_free_handle_slist_option (SCM option)
{
  SCM handle = cl_easy_init();
  SCM str_list = scm_list_2(scm_from_locale_string("foo"), scm_from_locale_string("bar"));
  SCM ret = cl_easy_setopt(handle, scm_variable_ref(option), str_list, SCM_BOOL_F);
  gc_free_handle(handle);
}
Beispiel #4
0
void test_free_handle_string_postfields(void)
{
  extern SCM cl_CURLOPT_POSTFIELDS;
  SCM handle = cl_easy_init();
  SCM str = scm_from_locale_string("abcdefghijklmnopqrstuvwxyz");
  SCM ret = cl_easy_setopt(handle, scm_variable_ref(cl_CURLOPT_POSTFIELDS), str, SCM_BOOL_F);
  gc_free_handle(handle);
}
Beispiel #5
0
int test_free_handle(void)
{
  SCM handle = cl_easy_init();
  gc_free_handle(handle);
  handle_post_t *x = _scm_to_handle(handle);
  int ret = (x == NULL);
  return ret;
}
Beispiel #6
0
SCM DLL_PUBLIC
cl_easy_cleanup (SCM handle)
{
  SCM_ASSERT (_scm_is_handle (handle), handle, SCM_ARG1, "%curl-easy-cleanup");

  gc_free_handle (handle);

  return SCM_UNSPECIFIED;
}
Beispiel #7
0
void test_free_handle_bytevector_postfields(void)
{
  extern SCM cl_CURLOPT_POSTFIELDS;
  SCM handle = cl_easy_init();
  SCM bv = scm_c_make_bytevector (26);

  for (int i = 0; i <= 25; i ++)
    SCM_BYTEVECTOR_CONTENTS(bv)[i] = i + 'a';

  SCM ret = cl_easy_setopt(handle, scm_variable_ref(cl_CURLOPT_POSTFIELDS), bv, SCM_BOOL_F);
  gc_free_handle(handle);
}