From ea505b01e52731e2d6023d5f191dbaea1652c9e2 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Tue, 28 Feb 2017 11:13:29 -0700 Subject: [PATCH] Add a spec for unlisted widgets fetching a new suggestion --- spec/options/widget_lists_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/options/widget_lists_spec.rb b/spec/options/widget_lists_spec.rb index 00441ee..c207c0c 100644 --- a/spec/options/widget_lists_spec.rb +++ b/spec/options/widget_lists_spec.rb @@ -66,6 +66,19 @@ describe 'a zle widget' do end end end + + context 'that modifies the buffer' do + before { session.run_command("#{widget}() { BUFFER=\"foo\" }") } + + context 'when not added to any of the widget lists' do + it 'modifies the buffer and fetches a new suggestion' do + with_history('foobar') do + session.send_keys('C-b') + wait_for { session.content }.to eq('foobar') + end + end + end + end end describe 'a modification to the widget lists' do