[BACK]Return to regress.pl CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc / regress

Diff for /mandoc/regress/regress.pl between version 1.4 and 1.7

version 1.4, 2017/03/05 19:57:39 version 1.7, 2017/07/04 15:24:36
Line 163  my @mandoc = '../mandoc';
Line 163  my @mandoc = '../mandoc';
 my @subdir_names;  my @subdir_names;
 my (@regress_testnames, @utf8_testnames, @lint_testnames);  my (@regress_testnames, @utf8_testnames, @lint_testnames);
 my (@html_testnames, @markdown_testnames);  my (@html_testnames, @markdown_testnames);
 my (%skip_ascii, %skip_man);  my (%skip_ascii, %skip_man, %skip_markdown);
   
 push @mandoc, split ' ', $vars{MOPTS} if $vars{MOPTS};  push @mandoc, split ' ', $vars{MOPTS} if $vars{MOPTS};
 delete $vars{MOPTS};  delete $vars{MOPTS};
Line 206  if (defined $vars{SKIP_TMAN}) {
Line 206  if (defined $vars{SKIP_TMAN}) {
         $skip_man{$_} = 1 for split ' ', $vars{SKIP_TMAN};          $skip_man{$_} = 1 for split ' ', $vars{SKIP_TMAN};
         delete $vars{SKIP_TMAN};          delete $vars{SKIP_TMAN};
 }  }
   if (defined $vars{SKIP_MARKDOWN}) {
           $skip_markdown{$_} = 1 for split ' ', $vars{SKIP_MARKDOWN};
           delete $vars{SKIP_MARKDOWN};
   }
 if (keys %vars) {  if (keys %vars) {
         my @vars = keys %vars;          my @vars = keys %vars;
         die "unknown var(s) @vars";          die "unknown var(s) @vars";
 }  }
 map { $skip_ascii{$_} = 1; } @regress_testnames if $skip_ascii{ALL};  map { $skip_ascii{$_} = 1; } @regress_testnames if $skip_ascii{ALL};
 map { $skip_man{$_} = 1; } @regress_testnames if $skip_man{ALL};  map { $skip_man{$_} = 1; } @regress_testnames if $skip_man{ALL};
   map { $skip_markdown{$_} = 1; } @regress_testnames if $skip_markdown{ALL};
   
 # --- run targets ------------------------------------------------------  # --- run targets ------------------------------------------------------
   
Line 235  for my $testname (@regress_testnames) {
Line 240  for my $testname (@regress_testnames) {
                 $count_ascii++;                  $count_ascii++;
                 $count_total++;                  $count_total++;
                 print "@mandoc -T ascii $i\n" if $targets{verbose};                  print "@mandoc -T ascii $i\n" if $targets{verbose};
                 sysout $o, @mandoc, qw(-T ascii), $i                  sysout $o, @mandoc, qw(-I os=OpenBSD -T ascii), $i
                     and fail $subdir, $testname, 'ascii:mandoc';                      and fail $subdir, $testname, 'ascii:mandoc';
                 system @diff, $w, $o                  system @diff, $w, $o
                     and fail $subdir, $testname, 'ascii:diff';                      and fail $subdir, $testname, 'ascii:diff';
Line 246  for my $testname (@regress_testnames) {
Line 251  for my $testname (@regress_testnames) {
                 $count_man++;                  $count_man++;
                 $count_total++;                  $count_total++;
                 print "@mandoc -T man $i\n" if $targets{verbose};                  print "@mandoc -T man $i\n" if $targets{verbose};
                 sysout $m, @mandoc, qw(-T man), $i                  sysout $m, @mandoc, qw(-I os=OpenBSD -T man), $i
                     and fail $subdir, $testname, 'man:man';                      and fail $subdir, $testname, 'man:man';
                 print "@mandoc -man -T ascii $m\n" if $targets{verbose};                  print "@mandoc -man -T ascii $m\n" if $targets{verbose};
                 sysout $mo, @mandoc, qw(-man -T ascii -O mdoc), $m                  sysout $mo, @mandoc, qw(-man -I os=OpenBSD -T ascii -O mdoc), $m
                     and fail $subdir, $testname, 'man:mandoc';                      and fail $subdir, $testname, 'man:mandoc';
                 system @diff, $w, $mo                  system @diff, $w, $mo
                     and fail $subdir, $testname, 'man:diff';                      and fail $subdir, $testname, 'man:diff';
Line 274  for my $testname (@utf8_testnames) {
Line 279  for my $testname (@utf8_testnames) {
                 $count_utf8++;                  $count_utf8++;
                 $count_total++;                  $count_total++;
                 print "@mandoc -T utf8 $i\n" if $targets{verbose};                  print "@mandoc -T utf8 $i\n" if $targets{verbose};
                 sysout $o, @mandoc, qw(-T utf8), $i                  sysout $o, @mandoc, qw(-I os=OpenBSD -T utf8), $i
                     and fail $subdir, $testname, 'utf8:mandoc';                      and fail $subdir, $testname, 'utf8:mandoc';
                 system @diff, $w, $o                  system @diff, $w, $o
                     and fail $subdir, $testname, 'utf8:diff';                      and fail $subdir, $testname, 'utf8:diff';
Line 307  for my $testname (@html_testnames) {
Line 312  for my $testname (@html_testnames) {
 }  }
   
 my $count_markdown = 0;  my $count_markdown = 0;
 for my $testname (@markdown_testnames) {  for my $testname (@regress_testnames) {
         next if $onlytest && $testname ne $onlytest;          next if $onlytest && $testname ne $onlytest;
         my $i = "$subdir/$testname.in";          my $i = "$subdir/$testname.in";
         my $o = "$subdir/$testname.mandoc_markdown";          my $o = "$subdir/$testname.mandoc_markdown";
         my $w = "$subdir/$testname.out_markdown";          my $w = "$subdir/$testname.out_markdown";
         if ($targets{markdown}) {          if ($targets{markdown} && !$skip_markdown{$testname}) {
                 $count_markdown++;                  $count_markdown++;
                 $count_total++;                  $count_total++;
                 print "@mandoc -T markdown $i\n" if $targets{verbose};                  print "@mandoc -T markdown $i\n" if $targets{verbose};
                 sysout $o, @mandoc, qw(-T markdown), $i                  sysout $o, @mandoc, qw(-I os=OpenBSD -T markdown), $i
                     and fail $subdir, $testname, 'markdown:mandoc';                      and fail $subdir, $testname, 'markdown:mandoc';
                 system @diff, $w, $o                  system @diff, $w, $o
                     and fail $subdir, $testname, 'markdown:diff';                      and fail $subdir, $testname, 'markdown:diff';
Line 336  for my $testname (@lint_testnames) {
Line 341  for my $testname (@lint_testnames) {
         if ($targets{lint}) {          if ($targets{lint}) {
                 $count_lint++;                  $count_lint++;
                 $count_total++;                  $count_total++;
                 print "@mandoc -T lint $i\n" if $targets{verbose};                  print "@mandoc -T lint -W all $i\n" if $targets{verbose};
                 syslint $o, @mandoc, qw(-T lint), $i                  syslint $o, @mandoc, qw(-I os=OpenBSD -T lint -W all), $i
                     and fail $subdir, $testname, 'lint:mandoc';                      and fail $subdir, $testname, 'lint:mandoc';
                 system @diff, $w, $o                  system @diff, $w, $o
                     and fail $subdir, $testname, 'lint:diff';                      and fail $subdir, $testname, 'lint:diff';

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

CVSweb