summaryrefslogtreecommitdiff
path: root/bin/generate-tests
blob: 73fd29ecb1dc6f25bc382a4de2965c6a6eb0ec90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
@files = glob('FS/*.pm');
foreach (@files) {
#  warn $_;
  chomp;
  s/^FS\///;
  $f=$_;
  $f=~s/pm$/t/;
  $m=$_;
  $m=~s/\.pm$//;
  open(TEST,">t/$f");
  print "t/$f\n";
  print TEST
             'BEGIN { $| = 1; print "1..1\n" }'. "\n".
             'END {print "not ok 1\n" unless $loaded;}'. "\n".
             "use FS::$m;\n".
             '$loaded=1;'. "\n".
             'print "ok 1\n";'. "\n"
             ;
  close TEST;
}