Skip to content
Browse files

Create test for selecting inner rubyblock.

This test passes, whereas the equivalent test for selecting the entire
rubyblock fails. Weird.
  • Loading branch information...
1 parent 87b8fb5 commit 9d56d67b8b10ccfb2a4f12cce4ed8306ad79405d @nelstrom committed Dec 22, 2010
Showing with 24 additions and 4 deletions.
  1. +24 −4 test/basic.input
View
28 test/basic.input
@@ -36,8 +36,28 @@ function s:describe__default_key_mappings()
Should maparg('ie', 'v') ==# '<Plug>(textobj-rubyblock-i)'
endfunction
-function s:describe__select_a() "{{{1
- It "<Plug>(textobj-rubyblock-a)"
+"function s:describe__select_a()
+ "It "<Plug>(textobj-rubyblock-a)"
+
+ "tabnew
+ "tabonly!
+
+ "silent put =[
+ "\ 'class Foo',
+ "\ ' include Bar',
+ "\ 'end',
+ "\ ]
+ "1 delete _
+ "normal! 2G
+
+ "execute "normal v\<Plug>(textobj-rubyblock-a)\<Esc>"
+ "Should [line("'<"), col("'<")] ==# [1, 1]
+ "Should [line("'>"), col("'>")] ==# [3, 4]
+
+"endfunction
+
+function s:describe__select_i()
+ It "<Plug>(textobj-rubyblock-i)"
tabnew
tabonly!
@@ -50,8 +70,8 @@ function s:describe__select_a() "{{{1
1 delete _
normal! 2G
- execute "normal v\<Plug>(textobj-rubyblock-a)\<Esc>"
- Should [line("'<"), col("'<")] ==# [1, 1]
+ execute "normal v\<Plug>(textobj-rubyblock-i)\<Esc>"
+ Should [line("'<"), col("'<")] ==# [2, 1]
Should [line("'>"), col("'>")] ==# [3, 4]
endfunction

0 comments on commit 9d56d67

Please sign in to comment.
Something went wrong with that request. Please try again.