Skip to content

Commit

Permalink
failing test for banner stripping trailing newlines during parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Kala committed Aug 27, 2024
1 parent 11f5e88 commit 78dd931
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from netutils.config.parser import ConfigLine

data = [
ConfigLine(config_line="hostname banner_with_newline", parents=()),
ConfigLine(config_line='banner login ^C', parents=()),
ConfigLine(config_line='****************************************************\nWARNING TO UNAUTHORIZED USERS:\nThis system is for use by authorized users only.\n****************************************************\n^C', parents=('banner login ^C',)),
ConfigLine(config_line="line vty 0 4", parents=()),
ConfigLine(config_line=" transport ssh", parents=("line vty 0 4",)),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
hostname banner_with_newline
!
banner login ^C
****************************************************
WARNING TO UNAUTHORIZED USERS:
This system is for use by authorized users only.
****************************************************

^C
!
line vty 0 4
transport ssh
!

0 comments on commit 78dd931

Please sign in to comment.