Changeset 484 for trunk


Ignore:
Timestamp:
Sep 1, 2015, 7:45:56 PM (6 years ago)
Author:
katerina
Message:

Fix for ticket #382 (no error message for invalid checksum skip condition list).

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_restrict.c

    r383 r484  
    338338      if (e && (e != s))
    339339        {
     340          /* check that nothing follows */
     341          char * u = e;
     342          ++u; for (; *u && isspace((int)*u); ++u) /* nothing */;
     343          if (*u != '\0') return NULL;
     344         
    340345          /* strip trailing space */
    341346          *e = '\0'; --e;
     
    553558  CuAssertPtrNotNull(tc, sh_restrict_list);
    554559
     560  strcpy(str, "size_exceeds(800); match_prefix(/foo), have_permission(0100)");
     561  res = sh_restrict_define(str);
     562  CuAssertIntEquals(tc,-1,res);
     563  CuAssertPtrNotNull(tc, sh_restrict_list);
     564 
    555565  res = sh_restrict_this("/home/foo.mpg", 1000, 0755, 0);
    556566  CuAssertIntEquals(tc,1,res);
  • trunk/src/sh_string.c

    r481 r484  
    989989    }
    990990
     991  /* split_array_list */
     992  iarr = 6; strcpy(test, " this(a) is_a(test);for(b),remainder(test)foo(bar)");
     993  array  = split_array_list (test, &iarr, lengths);
     994  CuAssertIntEquals(tc,3,(int)iarr);
     995  CuAssertStrEquals(tc,"this(a)",   array[0]);
     996  CuAssertStrEquals(tc,"is_a(test);for(b)",     array[1]);
     997  CuAssertStrEquals(tc,"remainder(test)foo(bar)",     array[2]);
     998  for (i = 0; i < 3; ++i)
     999    {
     1000      CuAssertIntEquals(tc, (int)strlen(array[i]), lengths[i] );
     1001    }
     1002
     1003 
    9911004  /* string replace */
    9921005  s = sh_string_new_from_lchar3 ("abc ", 4, "def ", 4, "ghi ", 4);
Note: See TracChangeset for help on using the changeset viewer.