rem: assert(s == ICAL_2_1_FALLBACK_STATUS);  assert(icalenum_reqstat_major(s) == 2); assert(icalenum_reqstat_minor(s) == 1);  printf("2.1: %s\n",icalenum_reqstat_desc(s));  st.code = s; st.debug = "booga"; st.desc = 0;  printf("%s\n",icalreqstattype_as_string(st));  st.desc = " A non-standard description";  printf("%s\n",icalreqstattype_as_string(st));   st.desc = 0;  sprintf(temp,"%s\n",icalreqstattype_as_string(st));   st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;booga");  printf("%d --  %d --  %s -- %s\n",icalenum_reqstat_major(st2.code), icalenum_reqstat_minor(st2.code), icalenum_reqstat_desc(st2.code), st2.debug);  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;booga"); printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;"); printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values."); printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;"); printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1"); printf("%s\n",icalreqstattype_as_string(st2));  #ifndef ICAL_ERRORS_ARE_FATAL st2 = icalreqstattype_from_string("16.4"); assert(st2.code == ICAL_UNKNOWN_STATUS);  st2 = icalreqstattype_from_string("1."); assert(st2.code == ICAL_UNKNOWN_STATUS); #endif
add: icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_NONFATAL); st2 = icalreqstattype_from_string("16.4"); assert(st2.code == ICAL_UNKNOWN_STATUS);  st2 = icalreqstattype_from_string("1."); assert(st2.code == ICAL_UNKNOWN_STATUS); icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_DEFAULT);
context: void test_requeststat(){  icalrequeststatus s;  struct icalreqstattype st, st2;  char temp[1024];  s = icalenum_num_to_reqstat(2,1);  assert(s == ICAL_2_1_FALLBACK_STATUS);  assert(icalenum_reqstat_major(s) == 2);  assert(icalenum_reqstat_minor(s) == 1);  printf("2.1: %s\n",icalenum_reqstat_desc(s));  st.code = s;  st.debug = "booga";  st.desc = 0;  printf("%s\n",icalreqstattype_as_string(st));  st.desc = " A non-standard description";  printf("%s\n",icalreqstattype_as_string(st));  st.desc = 0;  sprintf(temp,"%s\n",icalreqstattype_as_string(st));    st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;booga");  printf("%d --  %d --  %s -- %s\n",icalenum_reqstat_major(st2.code),         icalenum_reqstat_minor(st2.code),         icalenum_reqstat_desc(st2.code),         st2.debug);  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;booga");  printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.;");  printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;Success but fallback taken  on one or more property  values.");  printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1;");  printf("%s\n",icalreqstattype_as_string(st2));  st2 = icalreqstattype_from_string("2.1");  printf("%s\n",icalreqstattype_as_string(st2));#ifndef ICAL_ERRORS_ARE_FATAL  st2 = icalreqstattype_from_string("16.4");  assert(st2.code == ICAL_UNKNOWN_STATUS);  st2 = icalreqstattype_from_string("1.");  assert(st2.code == ICAL_UNKNOWN_STATUS);#endif}