test/misc_test.rb in openwferu-0.9.9 vs test/misc_test.rb in openwferu-0.9.10
- old
+ new
@@ -76,9 +76,18 @@
d = REXML::Document.new("<document/>")
d1 = OpenWFE::fulldup(d)
assert d.object_id != d1.object_id
end
+ def test_grep_0
+ assert OpenWFE::grep("sputnik", "Rakefile").empty?
+ assert_equal OpenWFE::grep("Mettraux", "Rakefile").size, 4
+
+ OpenWFE::grep "Mettraux", "Rakefile" do |line|
+ assert_match "Mettraux", line
+ end
+ end
+
private
class A
attr_accessor :a, :b