소스 검색

Add test for the MRUToggle command

Yegappan Lakshmanan 4 년 전
부모
커밋
33573a1fbc
1개의 변경된 파일30개의 추가작업 그리고 0개의 파일을 삭제
  1. 30 0
      test/unit_tests.vim

+ 30 - 0
test/unit_tests.vim

@@ -1563,6 +1563,36 @@ func Test_53()
   call LogResult(test_name, 'pass')
 endfunc
 
+" ==========================================================================
+" Test54
+" Test for the :MRUToggle command.
+" ==========================================================================
+func Test_54()
+  let test_name = 'test54'
+  %bw!
+  " open the MRU window
+  MRUToggle
+  if bufwinnr(g:MRU_buffer_name) != 2 || winnr() != 2
+    call LogResult(test_name, 'FAIL (1)')
+    return
+  endif
+  " close the MRU window
+  MRUToggle
+  if bufwinnr(g:MRU_buffer_name) != -1 || winnr() != 1
+    call LogResult(test_name, 'FAIL (2)')
+    return
+  endif
+  " close the MRU window from some other window
+  MRUToggle
+  wincmd k
+  MRUToggle
+  if bufwinnr(g:MRU_buffer_name) != -1 || winnr() != 1
+    call LogResult(test_name, 'FAIL (3)')
+    return
+  endif
+  call LogResult(test_name, 'pass')
+endfunc
+
 " ==========================================================================
 
 " Create the files used by the tests