From 4f84dd0f3326e1407dccf688b83de457b8718d8f Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 25 Jan 2015 10:20:11 +0000 Subject: [PATCH] [#128] Added some Juniper interface examples to the Port sort test --- Netdisco/Changes | 1 + Netdisco/t/10-sort_port.t | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Netdisco/Changes b/Netdisco/Changes index 04f80b39..b4720e62 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -7,6 +7,7 @@ [ENHANCEMENTS] * [#179] Catch failure to get uptime from device + * [#128] Added some Juniper interface examples to the Port sort test [BUG FIXES] diff --git a/Netdisco/t/10-sort_port.t b/Netdisco/t/10-sort_port.t index 0ec24bf4..d7e44cb1 100644 --- a/Netdisco/t/10-sort_port.t +++ b/Netdisco/t/10-sort_port.t @@ -15,4 +15,14 @@ is(sort_port(1,1), 0, 'number - same values'); is(sort_port('1:2','1:10'), -1, 'colon number (Extreme) - first lesser'); is(sort_port('D1','D10'), -1, 'HP - simple letter and number [#152]'); +# Juniper examples for [#128] +# https://www.juniper.net/documentation/en_US/junos14.2/topics/concept/interfaces-interface-naming-overview.html +is(sort_port('so-1/0/0.0','so-1/0/1.0'), -1, 'juniper - FPC in slot 1 with OC3 PIC - 1'); +is(sort_port('so-1/1/0.0','so-1/1/1.0'), -1, 'juniper - FPC in slot 1 with OC3 PIC - 2'); +is(sort_port('so-1/0/0.0','so-1/1/0.0'), -1, 'juniper - FPC in slot 1 with OC3 PIC - 3'); + +is(sort_port('so-1/0/0:0','so-1/0/1:0'), -1, 'juniper - FPC in slot 1 with OC3 PIC channelized - 1'); +is(sort_port('so-1/1/0:0','so-1/1/1:0'), -1, 'juniper - FPC in slot 1 with OC3 PIC channelized - 2'); +is(sort_port('so-1/0/0:0','so-1/1/0:0'), -1, 'juniper - FPC in slot 1 with OC3 PIC channelized - 3'); + done_testing;