Index: trunk/src/sh_restrict.c
===================================================================
--- trunk/src/sh_restrict.c	(revision 483)
+++ trunk/src/sh_restrict.c	(revision 484)
@@ -338,4 +338,9 @@
       if (e && (e != s))
 	{
+	  /* check that nothing follows */
+	  char * u = e;
+	  ++u; for (; *u && isspace((int)*u); ++u) /* nothing */;
+	  if (*u != '\0') return NULL;
+	  
 	  /* strip trailing space */
 	  *e = '\0'; --e;
@@ -553,4 +558,9 @@
   CuAssertPtrNotNull(tc, sh_restrict_list);
 
+  strcpy(str, "size_exceeds(800); match_prefix(/foo), have_permission(0100)");
+  res = sh_restrict_define(str);
+  CuAssertIntEquals(tc,-1,res);
+  CuAssertPtrNotNull(tc, sh_restrict_list);
+  
   res = sh_restrict_this("/home/foo.mpg", 1000, 0755, 0);
   CuAssertIntEquals(tc,1,res);
Index: trunk/src/sh_string.c
===================================================================
--- trunk/src/sh_string.c	(revision 483)
+++ trunk/src/sh_string.c	(revision 484)
@@ -989,4 +989,17 @@
     }
 
+  /* split_array_list */
+  iarr = 6; strcpy(test, " this(a) is_a(test);for(b),remainder(test)foo(bar)");
+  array  = split_array_list (test, &iarr, lengths);
+  CuAssertIntEquals(tc,3,(int)iarr);
+  CuAssertStrEquals(tc,"this(a)",   array[0]);
+  CuAssertStrEquals(tc,"is_a(test);for(b)",     array[1]);
+  CuAssertStrEquals(tc,"remainder(test)foo(bar)",     array[2]);
+  for (i = 0; i < 3; ++i)
+    {
+      CuAssertIntEquals(tc, (int)strlen(array[i]), lengths[i] );
+    }
+
+  
   /* string replace */
   s = sh_string_new_from_lchar3 ("abc ", 4, "def ", 4, "ghi ", 4);
