Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/device/h3c/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
promptExpression = `(\r\r?\n|^|\x00)(?P<prompt>((\(M\))?[<\[][\w\-/]+[>\]]|\[[~*]?[/\w\-.:]+\]))$`
errorExpression = `(` +
`(\^\r\n)?( % )?Error:(?P<error>.+) 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<store>(\r\n|\n))? ---- More ----$`
)
Expand Down
1 change: 1 addition & 0 deletions pkg/device/h3c/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Loading