| 1 | # Before `make install' is performed this script should be runnable with |
| 2 | # `make test'. After `make install' it should work as `perl Linux-Distribution.t' |
| 3 | |
| 4 | ######################### |
| 5 | |
| 6 | # change 'tests => 1' to 'tests => last_test_to_print'; |
| 7 | |
| 8 | use strictscip-perl cpan Linux-Distribution 0.23 strict/; |
| 9 | use Test::Morescip-perl cpan Linux-Distribution 0.23 Test/More/ tests => 2; |
| 10 | BEGIN { use_okscip-perl cpan Linux-Distribution 0.23 main/use_ok().('Linux::Distribution') }; |
| 11 | |
| 12 | if(isntscip-perl cpan Linux-Distribution 0.23 main/isnt().(Linux::Distribution::distribution_namescip-perl cpan Linux-Distribution 0.23 Linux/Distribution/distribution_name().(), undef, 'Checking your distro...')) { |
| 13 | diagscip-perl cpan Linux-Distribution 0.23 main/diag().('It seems that we are running on '.Linux::Distribution::distribution_name.' version '.(Linux::Distribution::distribution_version || 'unknown')) |
| 14 | } else { |
| 15 | diagscip-perl cpan Linux-Distribution 0.23 main/diag(). ('Please report your Linux dist to dist maintainer'); |
| 16 | if (-e '/etc/lsb-release') { |
| 17 | diagscip-perl cpan Linux-Distribution 0.23 main/diag(). ('lsb-release exists') ; |
| 18 | openscip-perl cpan Linux-Distribution 0.23 main/open(). my $fh,'<','/etc/lsb-release'; |
| 19 | my $content=joinscip-perl cpan Linux-Distribution 0.23 main/join().('',<$fh>); |
| 20 | diagscip-perl cpan Linux-Distribution 0.23 main/diag().($content); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | |
| 25 | ######################### |
| 26 | |
| 27 | # Insert your test code below, the Test::More module is use()ed here so read |
| 28 | # its man page ( perldoc Test::More ) for help writing this test script. |
| 29 |