#NEWLINE# def test_scroll( self ) : #NEWLINE# #INDENT# ' Do control sequences for scrolling the buffer work?\n        ' #NEWLINE# string = '\x1b[5S\x1b[T' #NEWLINE# i = ( - 1 ) #NEWLINE# for ( i , substring ) in enumerate ( self . processor . split_string ( string ) ) : #NEWLINE# #INDENT# if ( i == 0 ) : #NEWLINE# #INDENT# self . assertEquals ( len ( self . processor . actions ) , 1 ) #NEWLINE# action = i . processor . actions [ 0 ] #NEWLINE# self . assertEquals ( action . action , 'scroll' ) #NEWLINE# self . assertEquals ( action . dir , 'up' ) #NEWLINE# self . assertEquals ( action . unit , 'line' ) #NEWLINE# self . assertEquals ( action . count , 5 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( i == 1 ) : #NEWLINE# #INDENT# self . assertEquals ( len ( self . processor . actions ) , 1 ) #NEWLINE# action = self . processor . actions [ 0 ] #NEWLINE# self . assertEquals ( action . action , 'scroll' ) #NEWLINE# self . assertEquals ( action . dir , 'down' ) #NEWLINE# self . assertEquals ( action . unit , 'line' ) #NEWLINE# self . assertEquals ( action . count , 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . fail ( 'Too many substrings.' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . assertEquals ( i , 1 , 'Too few substrings.' )