summaryrefslogtreecommitdiffstats
path: root/t/03mediacfg.t
blob: 48d6a16a0d476d61390ee8b0489b987b65dfff1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;
use warnings;
use Test::More tests => 6;

use_ok('MDV::Distribconf::MediaCFG');
is(MDV::Distribconf::MediaCFG::_valid_param('foo', 'name', 'toto'), 0,
    "Valid value return no error");

is(MDV::Distribconf::MediaCFG::_valid_param('foo', 'size', '1'), 0,
    "valide size value");
is(MDV::Distribconf::MediaCFG::_valid_param('foo', 'size', '1k'), 0,
    "valide size value");
is(MDV::Distribconf::MediaCFG::_valid_param('foo', 'size', '1d'),  1,
    "non valide size value");
is(MDV::Distribconf::MediaCFG::_valid_param('foo', 'size', 'coin'), 1,
    "non valide size value");