Handle hostnames with upper-case letters
[webmin.git] / t / os_compare.t
1 #!/usr/bin/perl -w
2 # Test in command mode...
3 use strict;
4
5 my $DATADIR = "t/data";
6
7 # Get a list of the example OS definition files
8 opendir(DIR, $DATADIR) || die "can't opendir $DATADIR: $!";
9 my @files = grep { /\.os/ } readdir(DIR);
10 closedir DIR;
11 use Test::More qw(no_plan);
12 use Test::Files;
13
14 foreach my $file (sort @files) {
15         $file =~ /(.*)\.os$/;
16         my $osname = $1;
17         my $issue = $1 . ".issue";
18         my $outfile = "t/outfile";
19         my $result = `./OsChooser.pm os_list.txt $outfile 1 $DATADIR/$issue`;
20         # Do something with $result
21         compare_ok($outfile, "$DATADIR/$file", $osname);
22
23         # Cleanup
24         unlink $outfile;
25 }
26