Skip to content

Commit

Permalink
Print some progress details when running the fuzzing test with MAXI_T…
Browse files Browse the repository at this point in the history
…EST=1.
  • Loading branch information
mkende committed Mar 24, 2024
1 parent 68b0d7f commit ada0a38
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions t/801-fuzzing.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ use Test2::V0;
my $maxi_test = !!$ENV{MAXI_TEST};

my @token = (
'foo', 'bar', ' ', ' ', ' ', ' ', "\n", "\t", '"', '>', "\n>", '- ',
"\n- ", '1. ', "\n1. ", '[', ']', '[]', '[foo]', '\n[foo]:', ':', '/url',
'http://url', '<', '>', '<http://url>', '(', ')', '(http://url)', '*',
'*foo*', '**', '_', '`', '```', "\n```", '---', '--', '#', '##', '<div>',
'</div>', "\n\n", '![', '](', '](http://url)', " \n", "\\\n",
'foo', 'bar', 'baz', ' ', ' ', ' ', ' ', "\n", "\t", '"', '>', "\n>",
'- ', "\n- ", '1. ', "\n1. ", '[', ']', '[]', '[foo]', '\n[foo]:', ':',
'/url','http://url', '<', '>', '<http://url>', '(', ')', '(http://url)', '*',
'*foo*', '**', '_', '`', '```', "\n```", '---', '--', '-', '#', '##', '<div>',
'</div>', "\n\n", '![', '](', '](http://url)', " \n", "\\\n", '.',
'www.foo.fr', '&lt;', '&Amp;', '&', '+',
);

my $num_tests = $maxi_test ? 100000 : $ENV{EXTENDED_TESTING} ? 4000 : 500;
Expand Down Expand Up @@ -41,6 +42,9 @@ for (1 .. $num_tests) {
if (!$failed && !$maxi_test) {
pass('fuzz test');
}
if ($_ % 1000 == 0 && $maxi_test) {
note('Ran '.($_ / 1000).'% of the test');
}
}

if ($maxi_test) {
Expand Down

0 comments on commit ada0a38

Please sign in to comment.