Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create test for selecting inner rubyblock.

This test passes, whereas the equivalent test for selecting the entire
rubyblock fails. Weird.
  • Loading branch information...
commit 9d56d67b8b10ccfb2a4f12cce4ed8306ad79405d 1 parent 87b8fb5
Drew Neil authored

Showing 1 changed file with 24 additions and 4 deletions. Show diff stats Hide diff stats

  1. +24 4 test/basic.input
28 test/basic.input
@@ -36,8 +36,28 @@ function s:describe__default_key_mappings()
36 36 Should maparg('ie', 'v') ==# '<Plug>(textobj-rubyblock-i)'
37 37 endfunction
38 38
39   -function s:describe__select_a() "{{{1
40   - It "<Plug>(textobj-rubyblock-a)"
  39 +"function s:describe__select_a()
  40 + "It "<Plug>(textobj-rubyblock-a)"
  41 +
  42 + "tabnew
  43 + "tabonly!
  44 +
  45 + "silent put =[
  46 + "\ 'class Foo',
  47 + "\ ' include Bar',
  48 + "\ 'end',
  49 + "\ ]
  50 + "1 delete _
  51 + "normal! 2G
  52 +
  53 + "execute "normal v\<Plug>(textobj-rubyblock-a)\<Esc>"
  54 + "Should [line("'<"), col("'<")] ==# [1, 1]
  55 + "Should [line("'>"), col("'>")] ==# [3, 4]
  56 +
  57 +"endfunction
  58 +
  59 +function s:describe__select_i()
  60 + It "<Plug>(textobj-rubyblock-i)"
41 61
42 62 tabnew
43 63 tabonly!
@@ -50,8 +70,8 @@ function s:describe__select_a() "{{{1
50 70 1 delete _
51 71 normal! 2G
52 72
53   - execute "normal v\<Plug>(textobj-rubyblock-a)\<Esc>"
54   - Should [line("'<"), col("'<")] ==# [1, 1]
  73 + execute "normal v\<Plug>(textobj-rubyblock-i)\<Esc>"
  74 + Should [line("'<"), col("'<")] ==# [2, 1]
55 75 Should [line("'>"), col("'>")] ==# [3, 4]
56 76
57 77 endfunction

0 comments on commit 9d56d67

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