public
Description: ruby libxml library targetting speed and ease of use. provides an hpricot-like interface to xml
Homepage: http://trac.hasno.info/fastxml
Clone URL: git://github.com/segfault/fastxml.git
created a test replicating a bus-err when doing a to_s from a searched 
node
segfault (author)
Sun May 11 20:38:01 -0700 2008
commit  93e12c6952c09403787ed9290cfe471f405e3360
tree    db99920cae9c51aad52f082be95f898d800a0556
parent  74028647385a89283fcd79fbff40709bcae02fc1
...
45
46
47
 
 
 
 
 
 
 
48
...
45
46
47
48
49
50
51
52
53
54
55
0
@@ -45,4 +45,11 @@ describe FastXml::Doc, " when created" do
0
     doc.root.children.should_not be_nil
0
   end
0
 
0
+ it 'should be able to process io from open' do
0
+ doc = FastXml( open( "./test_data/hasno_feed.xml" ) )
0
+ doc.should_not be_nil
0
+ doc.to_s.should_not be_nil
0
+ doc.to_s.length.should >= 200
0
+ end
0
+
0
 end
...
23
24
25
26
 
 
27
28
29
...
37
38
39
 
 
 
 
 
 
 
 
 
40
41
42
...
107
108
109
110
111
 
...
23
24
25
 
26
27
28
29
30
...
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
...
117
118
119
 
120
121
0
@@ -23,7 +23,8 @@ describe FastXml::Node, ' functionality' do
0
     (@node/"feed").length.should >= 1
0
     (@node/"feed").length.should == @node.search( '/feed' ).length
0
   end
0
-
0
+
0
+
0
   it 'should provide a children accessor' do
0
     @node.should respond_to( :children )
0
     @node.children.should_not be_nil
0
@@ -37,6 +38,15 @@ describe FastXml::Node, ' functionality' do
0
   it 'should provide a to_s method' do
0
     @node.should respond_to( :to_s )
0
     @node.to_s.should_not be_nil
0
+ @node.to_s.length.should > 0
0
+ end
0
+
0
+ it 'should provide valid nodes from searches' do
0
+ entries = @node.search( '//entry' )
0
+ entries.should_not be_nil
0
+ entries.length.should > 0
0
+ entries.first.should_not be_nil
0
+ entries.first.to_s.should_not be_nil
0
   end
0
   
0
   it 'should provide an inspect method' do
0
@@ -107,4 +117,4 @@ describe FastXml::Node, ' functionality' do
0
     @node.content.should_not be_nil
0
     @node.content.should == "test"
0
   end
0
-end
0
\ No newline at end of file
0
+end

Comments

    No one has commented yet.