diff --git a/pkg/device/h3c/device.go b/pkg/device/h3c/device.go index 11c9b230..79edf7f6 100644 --- a/pkg/device/h3c/device.go +++ b/pkg/device/h3c/device.go @@ -19,7 +19,7 @@ const ( promptExpression = `(\r\r?\n|^|\x00)(?P((\(M\))?[<\[][\w\-/]+[>\]]|\[[~*]?[/\w\-.:]+\]))$` errorExpression = `(` + `(\^\r\n)?( % )?Error:(?P.+) at '\^' position\.` + - `|\r\n % (Unrecognized command|Too many parameters|Incomplete command) found at '\^' position\.` + + `|\r\n % (Unrecognized command|Too many parameters|Incomplete command|Wrong parameter) found at '\^' position\.` + `)` pagerExpression = `(?P(\r\n|\n))? ---- More ----$` ) diff --git a/pkg/device/h3c/device_test.go b/pkg/device/h3c/device_test.go index b9a9a136..326d5b7d 100644 --- a/pkg/device/h3c/device_test.go +++ b/pkg/device/h3c/device_test.go @@ -13,6 +13,7 @@ func TestDeviceErrors(t *testing.T) { []byte("\r\n % Unrecognized command found at '^' position."), []byte("\r\n % Too many parameters found at '^' position."), []byte("\r\n % Incomplete command found at '^' position."), + []byte("\r\r\n % Wrong parameter found at '^' position."), } testutils.ExprTester(t, errorCases, errorExpression) }