parse( $rule )); if ($actual == $output) { print "-PASSED.\n"; $pass++; } else { print "-FAILED - expected output $output, actual output $actual.\n"; print "-Expression: $rule\n"; } } catch (AFPException $excep) { print "-FAILED - exception ".$excep->getMessage()." with input $rule\n"; } } print "$pass tests passed out of $check\n";