From 75f2611d099044bad13befb672904c035ae19d32 Mon Sep 17 00:00:00 2001 From: Vladimir Solomatin Date: Fri, 23 Jan 2026 16:22:30 +0300 Subject: [PATCH] [aruos] Support prompt with MAC address in it --- pkg/device/aruos/device.go | 2 +- pkg/device/aruos/device_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/device/aruos/device.go b/pkg/device/aruos/device.go index 6cb2ad7..b407c25 100644 --- a/pkg/device/aruos/device.go +++ b/pkg/device/aruos/device.go @@ -7,7 +7,7 @@ import ( ) const ( - promptExpression = `(\r\n)?(?P[\w\-()]+) ?# $` + promptExpression = `(\r\n)?(?P[\w\-():]+) ?# $` errorExpression = `% (Parse error|Incomplete command)` passwordExpression = `.*Password: $` loginExpression = `.*User: $` diff --git a/pkg/device/aruos/device_test.go b/pkg/device/aruos/device_test.go index 61e57ae..dd958e8 100644 --- a/pkg/device/aruos/device_test.go +++ b/pkg/device/aruos/device_test.go @@ -10,6 +10,8 @@ func TestPrompt(t *testing.T) { cases := [][]byte{ []byte("\r\nrrrrrr-w1# "), []byte("\r\nrrrrrr-w1 (config) # "), + []byte("\r\n00:4e:35:11:22:33# "), + []byte("\r\n00:4e:35:11:22:33 (config) # "), } testutils.ExprTester(t, cases, promptExpression) }