Skip to content

Commit

Permalink
Test mapping count support
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRadev committed Apr 26, 2020
1 parent 6b0f802 commit e111caa
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions spec/plugin/counts_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
require 'spec_helper'

RSpec.describe "Counts" do
let(:filename) { 'test.html' }

specify "with a count after the action" do
set_file_contents <<~HTML
<div prop class="test">
<span>Text</span>
</div>
HTML

vim.search('div')
edit('c2wspan')

assert_file_contents <<~HTML
<span class="test">
<span>Text</span>
</span>
HTML
end

specify "with a count before the action" do
set_file_contents <<~HTML
<div prop class="test">
<span>Text</span>
</div>
HTML

vim.search('div')
edit('2cwspan')

assert_file_contents <<~HTML
<span class="test">
<span>Text</span>
</span>
HTML
end
end

0 comments on commit e111caa

Please sign in to comment.