make_eyapp_c_tests.pl untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 37 CC 2 SCAR 12.8
CC
2
Cov
0%
get_grammars
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 #!/usr/bin/perl
2 # This program builds the files in t/cleanok/ and t/cleanvok/
3 # used to test the behavior of eyapp when executed with option '-c'
4 use warnings;
5 use strict;
6 use File::Basename;
7  
8 sub get_grammars {
9 open my $f, 'MANIFEST' || exit(0);
10 my @grammar = grep { m{examples/.*yp$} } <$f>;
11 close($f);
12 chomp(@grammar);
13 exit(0) unless @grammar;
14 return @grammar;
15 }
16  
17  
18 print "Generating test files for 'eyapp -c'\n";
19  
20 my @grammar = get_grammars();
21 for (@grammar) {
22 my ($name,$path,$suffix) = fileparse($_);
23 $path =~ s{/}{_}g;
24 my $cleanok = " t/cleanok/${path}_$name";
25 print "vim -O $cleanok $_\n";
26 system("./eyapp -c $_ > t/cleanok/${path}_$name");
27 my $cleanvok = " t/cleanvok/${path}_$name";
28 print "vim -O $cleanvok $_\n";
29 system("./eyapp -vc $_ > t/cleanvok/${path}_$name");
30 }