fix Port sort order for Extreme switches "1:10" format

This commit is contained in:
Oliver Gorwits
2014-01-01 23:18:39 +00:00
parent 49b94e94ed
commit 6493b276bf
3 changed files with 19 additions and 1 deletions

17
Netdisco/t/10-sort_port.t Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/perl
use strict; use warnings FATAL => 'all';
use Test::More 0.88;
BEGIN {
use_ok( 'App::Netdisco::Util::Web', 'sort_port' );
}
# 1 = first is greater
# 0 = same
# -1 = first is lesser
is(sort_port(1,1), 0, 'number - same values');
is(sort_port('1:2','1:10'), -1, 'colon number (Extreme) - first lesser');
done_testing;