+ my $ok = true;
+ foreach my $attr (@attrs) {
+ $ok &= qx(printf %s "$attr" | $program green --attr=$attr | $valgrind_cmd$program $switch) eq $attr;
+ }
+ ok($ok, "$type attribute");
+
+ my $attrs = join ',', @attrs;
+ is(qx(printf %s "$attrs" | $program green --attr=$attrs | $valgrind_cmd$program $switch), $attrs, "$type attributes");
+ }
+
+ ok(qx(printf %s "\e[\e[33m" | $valgrind_cmd$program $switch) eq "\e[", "$type with invalid sequence");
+
+ {
+ my $ok = true;
+ foreach my $option (qw(--attr=bold --exclude-random=black --omit-color-empty)) {
+ $ok &= qx($valgrind_cmd$program $option $switch $infile1 2>&1 >/dev/null) =~ /switch has no meaning with/;
+ }
+ ok($ok, "$type strict options");
+ }