aboutsummaryrefslogtreecommitdiffstats
path: root/test/rexml/test_ticket_80.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-27 13:10:55 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-27 13:10:55 +0000
commitba3d2f4ac20bec871fe96a393d923d0cbb0fd96a (patch)
tree897a0308607db1dad21eef1fee86b351e93ebfa5 /test/rexml/test_ticket_80.rb
parent313fa180333a1eb4d1fa1542930e83f8d77e6b2d (diff)
downloadruby-ba3d2f4ac20bec871fe96a393d923d0cbb0fd96a.tar.gz
* test/rexml/test_contrib.rb: Indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_ticket_80.rb')
-rw-r--r--test/rexml/test_ticket_80.rb46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/rexml/test_ticket_80.rb b/test/rexml/test_ticket_80.rb
index bd588814b3..ffeece5692 100644
--- a/test/rexml/test_ticket_80.rb
+++ b/test/rexml/test_ticket_80.rb
@@ -10,9 +10,9 @@ require 'test/unit'
require 'rexml/document'
module REXMLTests
-class Ticket80 < Test::Unit::TestCase
+ class Ticket80 < Test::Unit::TestCase
- @@xmlstr = '<?xml version="1.0"?>
+ @@xmlstr = '<?xml version="1.0"?>
<root xmlns="urn:some-xml-ns" xmlns:other="urn:some-other-xml-ns">
<l1-foo>
<l2 value="foo-01"/>
@@ -28,29 +28,29 @@ class Ticket80 < Test::Unit::TestCase
</l1-bar>
</root>'
- #----------------------------------------------------------------------------
- def test_xpathNamespacedChildWildcard
- # tests the "prefix:*" node test syntax
- out = Array.new
- REXML::XPath.each( REXML::Document.new(@@xmlstr),
- '/ns:root/ns:*/ns:l2/@value',
- { 'ns' => 'urn:some-xml-ns' } ) do |node| out.push node.value ; end
- chk = [ 'foo-01', 'foo-02', 'foo-03', 'bar-01', 'bar-02' ]
- assert_equal chk, out
- end
+ #----------------------------------------------------------------------------
+ def test_xpathNamespacedChildWildcard
+ # tests the "prefix:*" node test syntax
+ out = Array.new
+ REXML::XPath.each( REXML::Document.new(@@xmlstr),
+ '/ns:root/ns:*/ns:l2/@value',
+ { 'ns' => 'urn:some-xml-ns' } ) do |node| out.push node.value ; end
+ chk = [ 'foo-01', 'foo-02', 'foo-03', 'bar-01', 'bar-02' ]
+ assert_equal chk, out
+ end
- #----------------------------------------------------------------------------
- def test_xpathNamespacedChildWildcardWorkaround
- # tests a workaround for the "prefix:*" node test syntax
- out = Array.new
- REXML::XPath.each( REXML::Document.new(@@xmlstr),
- '/ns:root/*[namespace-uri()="urn:some-xml-ns"]/ns:l2/@value',
- { 'ns' => 'urn:some-xml-ns' } ) do |node| out.push node.value ; end
- chk = [ 'foo-01', 'foo-02', 'foo-03', 'bar-01', 'bar-02' ]
- assert_equal chk, out
- end
+ #----------------------------------------------------------------------------
+ def test_xpathNamespacedChildWildcardWorkaround
+ # tests a workaround for the "prefix:*" node test syntax
+ out = Array.new
+ REXML::XPath.each( REXML::Document.new(@@xmlstr),
+ '/ns:root/*[namespace-uri()="urn:some-xml-ns"]/ns:l2/@value',
+ { 'ns' => 'urn:some-xml-ns' } ) do |node| out.push node.value ; end
+ chk = [ 'foo-01', 'foo-02', 'foo-03', 'bar-01', 'bar-02' ]
+ assert_equal chk, out
+ end
-end
+ end
end
#------------------------------------------------------------------------------