From 0ebc315732889e57113d52bc3f462c4a1c2bafd8 Mon Sep 17 00:00:00 2001 From: John Mair Date: Sat, 12 Jan 2013 22:12:21 +0100 Subject: [PATCH] added spec for save-file for multiple -i ranges --- spec/commands/save_file_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/commands/save_file_spec.rb b/spec/commands/save_file_spec.rb index 614fd40e..ff5a1c34 100644 --- a/spec/commands/save_file_spec.rb +++ b/spec/commands/save_file_spec.rb @@ -42,6 +42,13 @@ describe "save-file" do @t.eval "save-file -i 1..2 --to #{@path}" File.read(@path).should == ":or_nostrils\n:sucking_up_all_the_oxygen\n" end + + it 'should save multi-ranged input expressions' do + @t.eval ':or_nostrils', ':sucking_up_all_the_oxygen', ':or_whatever', + ':baby_ducks', ':cannot_escape' + @t.eval "save-file -i 1..2 -i 4..5 --to #{@path}" + File.read(@path).should == ":or_nostrils\n:sucking_up_all_the_oxygen\n:baby_ducks\n:cannot_escape\n" + end end describe "saving methods" do