#NEWLINE# def testFromVisualModeToNormalMode( self ) : #NEWLINE# #INDENT# self . write ( 'abc\nxxx\nabc\nabc' ) #NEWLINE# self . clear_sel ( ) #NEWLINE# self . add_sel ( self . R ( ( 1 , 0 ) , ( 1 , 1 ) ) ) #NEWLINE# state = State ( self . view ) #NEWLINE# state . enter_visual_mode ( ) #NEWLINE# prev_mode = state . mode #NEWLINE# self . range [ 'left_ref' ] = "'<" #NEWLINE# self . range [ 'right_ref' ] = "'>" #NEWLINE# self . range [ 'text_range' ] = "'<,'>" #NEWLINE# self . view . run_command ( 'ex_delete' , { #NEWLINE# #INDENT# 'command_line' : "'<,'>delete" , #NEWLINE# #UNINDENT# } ) #NEWLINE# state = State ( self . view ) #NEWLINE# new_mode = state . mode #NEWLINE# self . assertNotEqual ( prev_mode , new_mode ) #NEWLINE# self . assertEqual ( new_mode , MODE_NORMAL )