Граф коммитов

95 Коммитов

Автор SHA1 Сообщение Дата
kou 1d8efe61d8 * test/rexml/parser/test_tree.rb
(TestTreeParser::TestInvalid#test_unmatched_close_tag):
  Compute expected value from test value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 14:02:10 +00:00
kou 73c57761a9 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Add source information to parse exception on no close tag error.
  [Bug #8844]  [ruby-dev:47672]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 14:01:20 +00:00
kou 4c1fa1a6a4 * test/rexml/parser/test_tree.rb: Fix test name to describe test
content.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:58:24 +00:00
kou a0657cd5d7 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Remove needless nested parse exception information.
  [Bug #8844]  [ruby-dev:47672]
  Reported by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:57:18 +00:00
kou bd2b8d2603 * test/rexml/parser/test_sax2.rb: Expand abbreviated class name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 10:12:28 +00:00
kou 45222164dc * lib/rexml/sax2listener.rb (REXML::SAX2Listener#notationdecl): Fix
wrong number of arguments in the template listener.
  [Bug #8731] [ruby-dev:47582]
  Reported by Ippei Obayashi.
* test/rexml/parser/test_sax2.rb: Add tests for parsing notation
  declarations with SAX2 API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 10:08:05 +00:00
kou 7e0022bc8e * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Fix wrong "%" position in parameter entity declaration event argument.
* test/rexml/parser/test_sax2.rb: Add tests for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:41:29 +00:00
kou f61f11a936 * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Support NDATA in external entity declaration.
* test/rexml/parser/test_sax2.rb: Add tests for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:09:25 +00:00
kou ce89dedde3 * NEWS (REXML::Parsers::SAX2Parser): Add about this change.
* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
  Fix wrong number of arguments. Document says "an array of the
  entity declaration" but it passes two or more arguments.
  This is a bug but it break backward compatibility.
  Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
* lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
  The listener template accepted two arguments.
* test/rexml/parser/test_sax2.rb: Add tests for external ID case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:01:41 +00:00
kou 99ed561b4b * test/rexml/parser/test_sax2.rb: Add SAX2 API test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 08:43:17 +00:00
kou 8a4567b207 * test/rexml/parse/test_document_type_declaration.rb: Add tests for
parsing document type declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 03:40:58 +00:00
kou b729f2da30 * test/rexml/parse/test_notation_declaration.rb (#test_system_public):
Add a test for PUBLIC notation and SYSTEM notation order case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 02:59:15 +00:00
kou 6d18dd8e4d * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC):
Fix loose "head" match regular expression.
  [Bug #8701] [ruby-dev:47551]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parse/test_notation_declaration.rb (#test_system_public):
  Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 02:34:06 +00:00
kou 5f8cba0705 * test/rexml/parse/test_notation_declaration.rb: Change class
name to follow file name change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 14:00:26 +00:00
kou 6668c32a7e * test/rexml/test_notationdecl_parsetest.rb: Rename to ...
* test/rexml/parse/test_notation_declaration.rb: ... this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:58:49 +00:00
kou 6b4a6fcbbf * test/rexml/test_notationdecl_mixin.rb: Remove duplicated tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:55:12 +00:00
kou 0c1139ea78 * test/rexml/test_notationdecl_parsetest.rb: Fix typos in expected
value.
  pubilc ->
  public
     ^^


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:53:35 +00:00
kou 7f6c69b142 * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
system literal in external ID system notation declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:52:06 +00:00
kou 806dd30fe2 * test/rexml/test_notationdecl_parsetest.rb: Fix a typo.
Extern  ID ->
  ExternalID
        ^^


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:05:02 +00:00
kou a41ab7b3b6 * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
public ID in external ID notation declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 13:04:10 +00:00
kou 43f944dcf1 * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:59:28 +00:00
kou 3e04769926 * test/rexml/test_notationdecl_parsetest.rb: Group tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:44:24 +00:00
kou 1251f51ee7 * test/rexml/test_notationdecl_mixin.rb (TestNotationDecl#test_name):
Move to ...
* test/rexml/test_notationdecl_parsetest.rb
  (TestNotationDecl#test_name): ... here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:38:41 +00:00
kou 5a5ede7359 * test/rexml/test_notationdecl_parsetest.rb: Remove setup because it
doesn't share anything with other tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:32:24 +00:00
kou a9c4b0f497 * test/rexml/test_attributes_mixin.rb: Remove a needless shebang.
* test/rexml/test_notationdecl_mixin.rb: ditto.
* test/rexml/test_doctype.rb: ditto.
* test/rexml/test_xml_declaration.rb: ditto.
* test/rexml/test_changing_encoding.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:25:36 +00:00
kou c1ada18d0c * test/rexml/test_notationdecl_parsetest.rb: remove a needless shebang.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 12:20:50 +00:00
kou 75a138732e * lib/rexml/parsers/streamparser.rb
(REXML::Parsers::StreamParser#parse): Add "entity" event support to
  listener. [Bug #8689] [ruby-dev:47542]
  Reported by Ippei Obayashi.
* test/rexml/test_stream.rb (StreamTester#entity): Add a test for
  the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 14:17:24 +00:00
kou c279e7ee6d * test/rexml/test_text.rb: Add missing tests for Text#<<.
Reported by nagachika. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 12:41:26 +00:00
kou 4e44eeaeb1 * lib/rexml/text.rb (REXML::Text.normalize): Fix a bug that all
entity filters are ignored. [ruby-dev:47278] [Bug #8302]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/test_entity.rb (EntityTester#test_entity_filter): Add
  a test of the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 14:36:30 +00:00
kou 562648e48c * lib/rexml/element.rb (REXML::Attributes#to_a): Support
namespaced attributes. [ruby-dev:47277] [Bug #8301]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/test_attributes.rb
  (AttributesTester#test_to_a_with_namespaces): Add a test of the
  above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 13:56:34 +00:00
akr 8f671120f1 * test/csv/test_features.rb, test/logger/test_logger.rb
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
  test/openssl/test_config.rb, test/psych/test_encoding.rb,
  test/psych/test_exception.rb, test/psych/test_psych.rb,
  test/psych/test_tainted.rb, test/readline/test_readline.rb,
  test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
  test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
  test/ruby/test_file.rb, test/ruby/test_io.rb,
  test/ruby/test_marshal.rb, test/ruby/test_process.rb,
  test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
  test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
  test/zlib/test_zlib.rb: Use Tempfile.create.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20 23:03:52 +00:00
kou 3b6d093451 * lib/rexml/security.rb (REXML::Security): create.
* lib/rexml/rexml.rb: move entity_expansion_limit and
  entity_expansion_text_limit accessors to ...
* lib/rexml/security.rb: ... here.
* lib/rexml/document.rb: use REXML::Security.
* lib/rexml/text.rb: use REXML::Security.
* test/rexml/test_document.rb: use REXML::Security.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 12:24:31 +00:00
naruse ef33958094 Use require_relative to require local library
* from 1.9 require relative path from the file must use require_relative.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 13:10:46 +00:00
usa 1ad9075734 * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
new attribute to read/write entity expansion text limit.  the default
  limit is 10Kb.

* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 09:35:46 +00:00
nobu 13d3f023c6 test: remove or replace trailing spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07 05:02:18 +00:00
kou ac9a8ac624 * lib/rexml/output.rb (REXML::Output): Don't output BOM in middle
of the output string.
* test/rexml/test_document.rb: Add a test for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 05:42:40 +00:00
kou 82aef2ae50 * test/rexml/test_document.rb: Fix tests that expect encoding name
isn't normalized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 04:58:03 +00:00
kou bdbc8c5b74 Revert r37439 and r37441
r37439:
	* lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encoding
	  module because XMLDecl doesn't convert encoding. This causes
	  removing XML encoding name normalization (encoding.upcase).
	  Encoding name in XML declaration is what user specifies.
	  I think this is reasonable change.
	* test/rexml/test_xml_declaration.rb: Add tests for the above change.

r37441:
	* test/rexml/test_core.rb (Tester#test_ticket_88): Follow the
	  change that encoding name in XML declaration isn't normalized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 04:46:06 +00:00
kou dbfb5deab6 * test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):
Fix a test that expects encoding in XML declaration is changed by
  Output's encoding. It is dropped feature.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 04:03:55 +00:00
kou 9c606a0a4c * test/rexml/test_core.rb (Tester#test_ticket_88): Follow the
change that encoding name in XML declaration isn't normalized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 03:55:06 +00:00
kou 3f817764e2 * lib/rexml/document.rb (REXML::Document#write): Document encoding
option. Now different encoding between XML file's encoding and
  XML declaration's encodiong is support.
  [Feature #4872] (work in progress)
* lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's
  encoding.
* test/rexml/test_document.rb: Update tests for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 03:53:09 +00:00
kou 69eedf6a18 * lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encoding
module because XMLDecl doesn't convert encoding. This causes
  removing XML encoding name normalization (encoding.upcase).
  Encoding name in XML declaration is what user specifies.
  I think this is reasonable change.
* test/rexml/test_xml_declaration.rb: Add tests for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 03:41:26 +00:00
kou bd2024165c * test/rexml/test_xml_declaration.rb (TestXmlDeclaration#test_*):
Remove needless prefix from test names.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 03:06:50 +00:00
kou 9a2dc8f9da * test/rexml/test_xml_declaration_parent_child.rb: Rename to ...
* test/rexml/test_xml_declaration.rb: ... this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 03:05:28 +00:00
kou 4e23505398 * test/rexml/test_document.rb: Remove needless indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 14:54:59 +00:00
kou 5f18ce9a02 * test/rexml/test_document.rb: Add tests for parsing XML encoded
by UTF-8 with BOM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 14:53:07 +00:00
kou a7322e3678 * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
  XML declration.
* test/rexml/test_document.rb: Add tests for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 12:42:37 +00:00
kou a750424cab * test/rexml/test_document.rb: Group tests that they parse
UTF-16XX encoded XML that has encoding="UTF-16" in XML declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 12:39:37 +00:00
kou 100b3be9ae * test/rexml/test_document.rb: Add tests for parsing XML encoded
by UTF-16 with BOM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 12:19:58 +00:00
kou af83fcfe4d * lib/rexml/document.rb (REXML::Document#write): Add :encoding option
to support custom XML encoding.
  [Feature #4872] (work in progress)
* test/rexml/test_document.rb: Add tests for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 06:43:38 +00:00