%!function cb_children (hg)
%!  hl = get (hg, "children");
%!  color = get (hl, "color");
%!  set (hl, 'userdata', isequal (color, [1 0 0]));
%!endfunction

%!test
%! hf = figure ("visible", "off");
%! unwind_protect
%!   hax = axes ("parent", hf);
%!   hg = hggroup ();
%!   addlistener (hg, "children", @cb_children);
%!   hl = line ([0, 1], [1, 1], "color", "r", "parent", hg);
%!   assert (get (hl, "userdata"), true);
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect
