test/tc/piper.rb in rio-0.4.2 vs test/tc/piper.rb in rio-0.5.1

- old
+ new

@@ -40,68 +40,69 @@ rp.run assert_equal(exp,out[]) end def test_cmd_out - ls = rio(?-,PROG['list_dir']) + ls = rio(?-,PROG[:list_dir]) checkit([@@dname],ls) end def test_cmd_out2 - ls = rio(?-,PROG['list_dir']+' d') + p PROG + ls = rio(?-,PROG[:list_dir]+' d') checkit(@@fnames,ls) end def test_cmd_cmd_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! checkit(@@fnames.select { |s| s =~ /1/ },ls,grep) end def test_cmd_cmd_cmd_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! - grep2 = rio(?-,PROG['find_lines']+' g').w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! + grep2 = rio(?-,PROG[:find_lines]+' g').w! checkit(@@fnames.select { |s| s =~ /g1/ },ls,grep,grep2) end def test_cmd_cmd_cmd_cmd_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! - grep2 = rio(?-,PROG['find_lines']+' g').w! - wc = rio(?-,PROG['count_lines']).w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! + grep2 = rio(?-,PROG[:find_lines]+' g').w! + wc = rio(?-,PROG[:count_lines]).w! checkit(["1"],ls,grep,grep2,wc) end def test_piper_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! rp1 = RIO::Piper::Base.new(ls,grep) checkit(@@fnames.select { |s| s =~ /1/ },rp1) end def test_piper_cmd_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! rp1 = RIO::Piper::Base.new(ls,grep) - grep2 = rio(?-,PROG['find_lines']+' g').w! + grep2 = rio(?-,PROG[:find_lines]+' g').w! checkit(@@fnames.select { |s| s =~ /g1/ },rp1,grep2) end def test_cmd_piper_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! - grep2 = rio(?-,PROG['find_lines']+' g').w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! + grep2 = rio(?-,PROG[:find_lines]+' g').w! rp1 = RIO::Piper::Base.new(grep,grep2) checkit(@@fnames.select { |s| s =~ /g1/ },ls,rp1) end def test_piper_piper_out - ls = rio(?-,PROG['list_dir']+' d') - grep = rio(?-,PROG['find_lines']+' 1').w! - grep2 = rio(?-,PROG['find_lines']+' g').w! - wc = rio(?-,PROG['count_lines']).w! + ls = rio(?-,PROG[:list_dir]+' d') + grep = rio(?-,PROG[:find_lines]+' 1').w! + grep2 = rio(?-,PROG[:find_lines]+' g').w! + wc = rio(?-,PROG[:count_lines]).w! rp1 = RIO::Piper::Base.new(ls,grep) rp2 = RIO::Piper::Base.new(grep2,wc) checkit(["1"],rp1,rp2) end @@ -110,33 +111,33 @@ checkit(rio('d/f2').chomp[],f) end def test_file_cmd_out f = rio('d/f2') - grep = rio(?-,PROG['find_lines']+' 2').w! + grep = rio(?-,PROG[:find_lines]+' 2').w! checkit(rio('d/f2').chomp[/2/],f,grep) end def test_file_cmd_cmd_out f = rio('d/f2') - grep = rio(?-,PROG['find_lines']+' 2').w! - grep2 = rio(?-,PROG['find_lines']+' 0').w! + grep = rio(?-,PROG[:find_lines]+' 2').w! + grep2 = rio(?-,PROG[:find_lines]+' 0').w! checkit(rio('d/f2').chomp[/0/],f,grep,grep2) end def test_file_cmd_cmd_cmd_out f = rio('d/f2') - grep = rio(?-,PROG['find_lines']+' 2').w! - grep2 = rio(?-,PROG['find_lines']+' 0').w! - wc = rio(?-,PROG['count_lines']).w! + grep = rio(?-,PROG[:find_lines]+' 2').w! + grep2 = rio(?-,PROG[:find_lines]+' 0').w! + wc = rio(?-,PROG[:count_lines]).w! checkit(["1"],f,grep,grep2,wc) end def test_file_piper_out f = rio('d/f2') - grep = rio(?-,PROG['find_lines']+' 2').w! - grep2 = rio(?-,PROG['find_lines']+' 0').w! + grep = rio(?-,PROG[:find_lines]+' 2').w! + grep2 = rio(?-,PROG[:find_lines]+' 0').w! rp1 = RIO::Piper::Base.new(grep,grep2) checkit(rio('d/f2').chomp[/0/],f,rp1) end end