[#15707] Schedule for the 1.8.7 release — "Akinori MUSHA" <knu@...>

Hi, developers,

21 messages 2008/03/01

[#15740] Copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>

Hi.

31 messages 2008/03/03
[#15742] Re: Copy-on-write friendly garbage collector — Yukihiro Matsumoto <matz@...> 2008/03/03

Hi,

[#15829] Re: Copy-on-write friendly garbage collector — Daniel DeLorme <dan-ml@...42.com> 2008/03/08

Yukihiro Matsumoto wrote:

[#15756] embedding Ruby 1.9.0 inside pthread — "Suraj Kurapati" <sunaku@...>

Hello,

18 messages 2008/03/03
[#15759] Re: embedding Ruby 1.9.0 inside pthread — Nobuyoshi Nakada <nobu@...> 2008/03/04

Hi,

[#15760] Re: embedding Ruby 1.9.0 inside pthread — Yukihiro Matsumoto <matz@...> 2008/03/04

Hi,

[#15762] Re: embedding Ruby 1.9.0 inside pthread — "Suraj N. Kurapati" <sunaku@...> 2008/03/04

Yukihiro Matsumoto wrote:

[#15783] Adding startup and shutdown to Test::Unit — Daniel Berger <Daniel.Berger@...>

Hi all,

15 messages 2008/03/04

[#15835] TimeoutError in core, timeouts for ConditionVariable#wait — MenTaLguY <mental@...>

I've been reworking JRuby's stdlib to improve performance and fix

10 messages 2008/03/09

[#15990] Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...>

Hi,

35 messages 2008/03/23
[#15991] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#15993] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/23

Hi Dave,

[#15997] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#16024] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

Hi Dave,

[#16025] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16026] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16027] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16029] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16030] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16031] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16032] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

On Wed, Mar 26, 2008 at 7:01 PM, Dave Thomas <dave@pragprog.com> wrote:

[#16033] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16041] Re: Recent changes in Range#step behavior — David Flanagan <david@...> 2008/03/26

Dave Thomas wrote:

Re: Bugs in REXML

From: "Federico Builes" <federico.builes@...>
Date: 2008-03-24 03:27:54 UTC
List: ruby-core #16000
On 3/23/08, Sam Ruby <rubys@intertwingly.net> wrote:
> Federico Builes wrote:
>  > * Fix for standalone's default value in XMLDecl -
>  > http://rubyforge.org/tracker/index.php?func=detail&aid=19032&group_id=426&atid=1698

I've closed my patch as rejected since the standalone value's not
mandatory. The patch made it appear on every single XMLDecl if nothing
was specified so I preferred to just remove it.

I still think that docs for Document#stand_alone? should be updated to
reflect that if no standalone value has been given, nil will be
returned (not the default value as the docs kindly say).

> Please don't take this as being ungrateful, but in order to prevent
>  future regressions, any chance that test cases for the issues that these
>  fixes address can be added?

I'm attaching the tests.
It should've been done in the last email but since I didn't see a
folder for rexml in tests/ I skipped that step, that was my bad.

This patch creates a simple test_rexml file covering the issues
pointed in the mail and is by no means exhaustive. Please take a look
and if you see something's missing please let me know.

-- 
Federico

Attachments (1)

tests_for_rexml.patch (1.25 KB, text/x-diff)
Index: test/rexml/test_rexml.rb
===================================================================
--- test/rexml/test_rexml.rb	(revision 0)
+++ test/rexml/test_rexml.rb	(revision 0)
@@ -0,0 +1,45 @@
+require 'test/unit'
+
+require 'rexml/document'
+
+
+class TestREXML < Test::Unit::TestCase
+  include REXML
+  
+  def setup
+    @doc = Document.new("<root/>")
+    @doc_type = DocType.new("Interesting")
+    @e = Element.new("test")
+  end
+
+  def test_unique_xmldecl
+    @doc.add XMLDecl.new("3.141592")
+    @doc.add XMLDecl.new("1.0")
+    assert_equal("<?xml version='1.0'?><root/>", @doc.to_s)
+  end
+
+  def test_doctype_at_beginning
+    @doc.add XMLDecl.new
+    @doc.add @doc_type
+    assert_equal("<?xml version='1.0'?><!DOCTYPE Interesting><root/>", @doc.to_s)
+  end
+
+  def test_unique_doctype
+    @doc.add XMLDecl.new
+    @doc.add DocType.new("Not Interesting")
+    @doc.add @doc_type
+    assert_equal("<?xml version='1.0'?><!DOCTYPE Interesting><root/>", @doc.to_s)
+  end
+
+  def test_get_attribute
+    h = Attributes.new(@e)
+    a = Attribute.new("foo", "bar")
+    h.add a
+    assert_equal(a, h.get_attribute(a))
+  end
+
+  def test_delete_attribute
+    @e.add_attribute("bla", "baz")
+    assert_equal(@e.delete_attribute("bla"), @e)
+  end
+end

In This Thread

Prev Next