File: Linux-Distribution.t

package info (click to toggle)
liblinux-distribution-perl 0.23-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 256 kB
  • sloc: perl: 149; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Linux-Distribution.t'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use strict;
use Test::More tests => 2;
BEGIN { use_ok('Linux::Distribution') };

if(isnt(Linux::Distribution::distribution_name(), undef, 'Checking your distro...')) {
  diag('It seems that we are running on '.Linux::Distribution::distribution_name.' version '.(Linux::Distribution::distribution_version || 'unknown'))
} else {
  diag ('Please report your Linux dist to dist maintainer');
  if (-e '/etc/lsb-release') {
    diag ('lsb-release exists') ;
    open my $fh,'<','/etc/lsb-release';
    my $content=join('',<$fh>);
    diag($content);
  }
}


#########################

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.