8f6170ce8e3d

tests: test arrow mappings
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 09 Dec 2010 22:02:46 -0500
parents feff77db2f43
children 254418fd1855
branches/tags (none)
files tests/test-movement.vim

Changes

--- a/tests/test-movement.vim	Thu Dec 09 21:59:57 2010 -0500
+++ b/tests/test-movement.vim	Thu Dec 09 22:02:46 2010 -0500
@@ -62,6 +62,34 @@
     " Move up
     normal k
     Assert g:CurrentLineContains("[3]")
+
+
+    " Test arrow mappings
+    Assert g:CurrentLineContains("[3]")
+
+    " Move down
+    exec "normal \<down>"
+    Assert g:CurrentLineContains("[2]")
+
+    " Move down
+    exec "normal \<down>"
+    Assert g:CurrentLineContains("[1]")
+
+    " Move down
+    exec "normal \<down>"
+    Assert g:CurrentLineContains("[0]")
+
+    " Move up
+    exec "normal \<up>"
+    Assert g:CurrentLineContains("[1]")
+
+    " Move up
+    exec "normal \<up>"
+    Assert g:CurrentLineContains("[2]")
+
+    " Move up
+    exec "normal \<up>"
+    Assert g:CurrentLineContains("[3]")
 endfunction"}}}
 
 function! s:TestMovementLinear()"{{{
@@ -117,4 +145,8 @@
     " Move up
     normal k
     Assert g:CurrentLineContains("[3]")
+
+    " Move up
+    normal k
+    Assert g:CurrentLineContains("[4]")
 endfunction"}}}