From 50069c19eda6822dae2f487d8c7ef0175674500d Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sat, 1 Nov 2025 14:47:09 +0000 Subject: [PATCH] Regroup tests under folder structure --- .../alias_test.rb} | 2 +- .../any_method_test.rb} | 2 +- .../attr_test.rb} | 2 +- .../class_module_test.rb} | 2 +- .../code_object_test.rb} | 2 +- .../constant_test.rb} | 2 +- .../extend_test.rb} | 2 +- .../include_test.rb} | 2 +- .../method_attr_test.rb} | 2 +- .../normal_class_test.rb} | 2 +- .../normal_module_test.rb} | 2 +- .../single_class_test.rb} | 2 +- .../darkfish_test.rb} | 2 +- .../json_index/searcher_test.rb} | 4 ++-- .../json_index_test.rb} | 2 +- .../markup_test.rb} | 2 +- .../pot/po_entry_test.rb} | 2 +- .../pot/po_test.rb} | 2 +- .../pot_test.rb} | 2 +- .../ri_test.rb} | 2 +- .../attribute_manager_test.rb} | 2 +- .../attributes_test.rb} | 2 +- .../document_test.rb} | 2 +- .../formatter_test.rb} | 2 +- .../hard_break_test.rb} | 2 +- .../heading_test.rb} | 2 +- .../include_test.rb} | 2 +- .../indented_paragraph_test.rb} | 2 +- .../markup_test.rb} | 2 +- .../paragraph_test.rb} | 2 +- .../parser_test.rb} | 2 +- .../pre_process_test.rb} | 4 ++-- .../raw_test.rb} | 2 +- .../to_ansi_test.rb} | 2 +- .../to_bs_test.rb} | 2 +- .../to_html_crossref_test.rb} | 2 +- .../to_html_snippet_test.rb} | 2 +- .../to_html_test.rb} | 2 +- .../to_joined_paragraph_test.rb} | 2 +- .../to_label_test.rb} | 2 +- .../to_markdown_test.rb} | 2 +- .../to_rdoc_test.rb} | 2 +- .../to_table_of_contents_test.rb} | 2 +- .../to_tt_only_test.rb} | 2 +- .../verbatim_test.rb} | 2 +- .../c_test.rb} | 2 +- .../changelog_test.rb} | 2 +- .../markdown_test.rb} | 2 +- .../parser_test.rb} | 22 +++++++++---------- .../prism_ruby_test.rb} | 2 +- .../rd_test.rb} | 2 +- .../ruby_test.rb} | 2 +- .../simple_test.rb} | 2 +- .../block_parser_test.rb} | 2 +- .../inline_parser_test.rb} | 2 +- .../inline_test.rb} | 2 +- test/rdoc/{rdoc_rd_test.rb => rd/rd_test.rb} | 2 +- .../driver_test.rb} | 2 +- .../paths_test.rb} | 2 +- 59 files changed, 71 insertions(+), 71 deletions(-) rename test/rdoc/{rdoc_alias_test.rb => code_object/alias_test.rb} (86%) rename test/rdoc/{rdoc_any_method_test.rb => code_object/any_method_test.rb} (99%) rename test/rdoc/{rdoc_attr_test.rb => code_object/attr_test.rb} (99%) rename test/rdoc/{rdoc_class_module_test.rb => code_object/class_module_test.rb} (99%) rename test/rdoc/{rdoc_code_object_test.rb => code_object/code_object_test.rb} (99%) rename test/rdoc/{rdoc_constant_test.rb => code_object/constant_test.rb} (99%) rename test/rdoc/{rdoc_extend_test.rb => code_object/extend_test.rb} (98%) rename test/rdoc/{rdoc_include_test.rb => code_object/include_test.rb} (98%) rename test/rdoc/{rdoc_method_attr_test.rb => code_object/method_attr_test.rb} (99%) rename test/rdoc/{rdoc_normal_class_test.rb => code_object/normal_class_test.rb} (97%) rename test/rdoc/{rdoc_normal_module_test.rb => code_object/normal_module_test.rb} (95%) rename test/rdoc/{rdoc_single_class_test.rb => code_object/single_class_test.rb} (90%) rename test/rdoc/{rdoc_generator_darkfish_test.rb => generator/darkfish_test.rb} (99%) rename test/rdoc/{rdoc_generator_json_index_searcher_test.rb => generator/json_index/searcher_test.rb} (99%) rename test/rdoc/{rdoc_generator_json_index_test.rb => generator/json_index_test.rb} (99%) rename test/rdoc/{rdoc_generator_markup_test.rb => generator/markup_test.rb} (97%) rename test/rdoc/{rdoc_generator_pot_po_entry_test.rb => generator/pot/po_entry_test.rb} (98%) rename test/rdoc/{rdoc_generator_pot_po_test.rb => generator/pot/po_test.rb} (97%) rename test/rdoc/{rdoc_generator_pot_test.rb => generator/pot_test.rb} (98%) rename test/rdoc/{rdoc_generator_ri_test.rb => generator/ri_test.rb} (98%) rename test/rdoc/{rdoc_markup_attribute_manager_test.rb => markup/attribute_manager_test.rb} (99%) rename test/rdoc/{rdoc_markup_attributes_test.rb => markup/attributes_test.rb} (97%) rename test/rdoc/{rdoc_markup_document_test.rb => markup/document_test.rb} (99%) rename test/rdoc/{rdoc_markup_formatter_test.rb => markup/formatter_test.rb} (99%) rename test/rdoc/{rdoc_markup_hard_break_test.rb => markup/hard_break_test.rb} (94%) rename test/rdoc/{rdoc_markup_heading_test.rb => markup/heading_test.rb} (96%) rename test/rdoc/{rdoc_markup_include_test.rb => markup/include_test.rb} (93%) rename test/rdoc/{rdoc_markup_indented_paragraph_test.rb => markup/indented_paragraph_test.rb} (97%) rename test/rdoc/{rdoc_markup_test.rb => markup/markup_test.rb} (97%) rename test/rdoc/{rdoc_markup_paragraph_test.rb => markup/paragraph_test.rb} (95%) rename test/rdoc/{rdoc_markup_parser_test.rb => markup/parser_test.rb} (99%) rename test/rdoc/{rdoc_markup_pre_process_test.rb => markup/pre_process_test.rb} (99%) rename test/rdoc/{rdoc_markup_raw_test.rb => markup/raw_test.rb} (91%) rename test/rdoc/{rdoc_markup_to_ansi_test.rb => markup/to_ansi_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_bs_test.rb => markup/to_bs_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_html_crossref_test.rb => markup/to_html_crossref_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_html_snippet_test.rb => markup/to_html_snippet_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_html_test.rb => markup/to_html_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_joined_paragraph_test.rb => markup/to_joined_paragraph_test.rb} (95%) rename test/rdoc/{rdoc_markup_to_label_test.rb => markup/to_label_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_markdown_test.rb => markup/to_markdown_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_rdoc_test.rb => markup/to_rdoc_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_table_of_contents_test.rb => markup/to_table_of_contents_test.rb} (99%) rename test/rdoc/{rdoc_markup_to_tt_only_test.rb => markup/to_tt_only_test.rb} (99%) rename test/rdoc/{rdoc_markup_verbatim_test.rb => markup/verbatim_test.rb} (93%) rename test/rdoc/{rdoc_parser_c_test.rb => parser/c_test.rb} (99%) rename test/rdoc/{rdoc_parser_changelog_test.rb => parser/changelog_test.rb} (99%) rename test/rdoc/{rdoc_parser_markdown_test.rb => parser/markdown_test.rb} (97%) rename test/rdoc/{rdoc_parser_test.rb => parser/parser_test.rb} (91%) rename test/rdoc/{rdoc_parser_prism_ruby_test.rb => parser/prism_ruby_test.rb} (99%) rename test/rdoc/{rdoc_parser_rd_test.rb => parser/rd_test.rb} (97%) rename test/rdoc/{rdoc_parser_ruby_test.rb => parser/ruby_test.rb} (99%) rename test/rdoc/{rdoc_parser_simple_test.rb => parser/simple_test.rb} (98%) rename test/rdoc/{rdoc_rd_block_parser_test.rb => rd/block_parser_test.rb} (99%) rename test/rdoc/{rdoc_rd_inline_parser_test.rb => rd/inline_parser_test.rb} (99%) rename test/rdoc/{rdoc_rd_inline_test.rb => rd/inline_test.rb} (97%) rename test/rdoc/{rdoc_rd_test.rb => rd/rd_test.rb} (95%) rename test/rdoc/{rdoc_ri_driver_test.rb => ri/driver_test.rb} (99%) rename test/rdoc/{rdoc_ri_paths_test.rb => ri/paths_test.rb} (99%) diff --git a/test/rdoc/rdoc_alias_test.rb b/test/rdoc/code_object/alias_test.rb similarity index 86% rename from test/rdoc/rdoc_alias_test.rb rename to test/rdoc/code_object/alias_test.rb index 827002e729..1c67b2e4fd 100644 --- a/test/rdoc/rdoc_alias_test.rb +++ b/test/rdoc/code_object/alias_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocAliasTest < XrefTestCase diff --git a/test/rdoc/rdoc_any_method_test.rb b/test/rdoc/code_object/any_method_test.rb similarity index 99% rename from test/rdoc/rdoc_any_method_test.rb rename to test/rdoc/code_object/any_method_test.rb index e963a3a345..0c72fc479e 100644 --- a/test/rdoc/rdoc_any_method_test.rb +++ b/test/rdoc/code_object/any_method_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocAnyMethodTest < XrefTestCase diff --git a/test/rdoc/rdoc_attr_test.rb b/test/rdoc/code_object/attr_test.rb similarity index 99% rename from test/rdoc/rdoc_attr_test.rb rename to test/rdoc/code_object/attr_test.rb index fcdbdfd422..8626fb3022 100644 --- a/test/rdoc/rdoc_attr_test.rb +++ b/test/rdoc/code_object/attr_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocAttrTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_class_module_test.rb b/test/rdoc/code_object/class_module_test.rb similarity index 99% rename from test/rdoc/rdoc_class_module_test.rb rename to test/rdoc/code_object/class_module_test.rb index dec1a4c24b..0a552d1fb4 100644 --- a/test/rdoc/rdoc_class_module_test.rb +++ b/test/rdoc/code_object/class_module_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocClassModuleTest < XrefTestCase diff --git a/test/rdoc/rdoc_code_object_test.rb b/test/rdoc/code_object/code_object_test.rb similarity index 99% rename from test/rdoc/rdoc_code_object_test.rb rename to test/rdoc/code_object/code_object_test.rb index af5c34257c..d4ef2a0553 100644 --- a/test/rdoc/rdoc_code_object_test.rb +++ b/test/rdoc/code_object/code_object_test.rb @@ -1,7 +1,7 @@ # coding: US-ASCII # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocCodeObjectTest < XrefTestCase diff --git a/test/rdoc/rdoc_constant_test.rb b/test/rdoc/code_object/constant_test.rb similarity index 99% rename from test/rdoc/rdoc_constant_test.rb rename to test/rdoc/code_object/constant_test.rb index f9f795101c..52e40da138 100644 --- a/test/rdoc/rdoc_constant_test.rb +++ b/test/rdoc/code_object/constant_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocConstantTest < XrefTestCase diff --git a/test/rdoc/rdoc_extend_test.rb b/test/rdoc/code_object/extend_test.rb similarity index 98% rename from test/rdoc/rdoc_extend_test.rb rename to test/rdoc/code_object/extend_test.rb index cf13eba0c5..a2fbfd6d3e 100644 --- a/test/rdoc/rdoc_extend_test.rb +++ b/test/rdoc/code_object/extend_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocExtendTest < XrefTestCase diff --git a/test/rdoc/rdoc_include_test.rb b/test/rdoc/code_object/include_test.rb similarity index 98% rename from test/rdoc/rdoc_include_test.rb rename to test/rdoc/code_object/include_test.rb index 6b78d2a749..c49e1824ba 100644 --- a/test/rdoc/rdoc_include_test.rb +++ b/test/rdoc/code_object/include_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocIncludeTest < XrefTestCase diff --git a/test/rdoc/rdoc_method_attr_test.rb b/test/rdoc/code_object/method_attr_test.rb similarity index 99% rename from test/rdoc/rdoc_method_attr_test.rb rename to test/rdoc/code_object/method_attr_test.rb index 54a2a0d395..bffcb799d3 100644 --- a/test/rdoc/rdoc_method_attr_test.rb +++ b/test/rdoc/code_object/method_attr_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocMethodAttrTest < XrefTestCase diff --git a/test/rdoc/rdoc_normal_class_test.rb b/test/rdoc/code_object/normal_class_test.rb similarity index 97% rename from test/rdoc/rdoc_normal_class_test.rb rename to test/rdoc/code_object/normal_class_test.rb index d61ef5ccd9..431ca4b3f1 100644 --- a/test/rdoc/rdoc_normal_class_test.rb +++ b/test/rdoc/code_object/normal_class_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocNormalClassTest < XrefTestCase diff --git a/test/rdoc/rdoc_normal_module_test.rb b/test/rdoc/code_object/normal_module_test.rb similarity index 95% rename from test/rdoc/rdoc_normal_module_test.rb rename to test/rdoc/code_object/normal_module_test.rb index bb0a2afc76..0a45b950f6 100644 --- a/test/rdoc/rdoc_normal_module_test.rb +++ b/test/rdoc/code_object/normal_module_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' class RDocNormalModuleTest < XrefTestCase diff --git a/test/rdoc/rdoc_single_class_test.rb b/test/rdoc/code_object/single_class_test.rb similarity index 90% rename from test/rdoc/rdoc_single_class_test.rb rename to test/rdoc/code_object/single_class_test.rb index 6bbc5a2bd4..b05730f57a 100644 --- a/test/rdoc/rdoc_single_class_test.rb +++ b/test/rdoc/code_object/single_class_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocSingleClassTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_darkfish_test.rb b/test/rdoc/generator/darkfish_test.rb similarity index 99% rename from test/rdoc/rdoc_generator_darkfish_test.rb rename to test/rdoc/generator/darkfish_test.rb index fd13c8cc69..cd53d5f56f 100644 --- a/test/rdoc/rdoc_generator_darkfish_test.rb +++ b/test/rdoc/generator/darkfish_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocGeneratorDarkfishTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_json_index_searcher_test.rb b/test/rdoc/generator/json_index/searcher_test.rb similarity index 99% rename from test/rdoc/rdoc_generator_json_index_searcher_test.rb rename to test/rdoc/generator/json_index/searcher_test.rb index 065ea04e17..d5f0635ef7 100644 --- a/test/rdoc/rdoc_generator_json_index_searcher_test.rb +++ b/test/rdoc/generator/json_index/searcher_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../../helper' return if RUBY_DESCRIPTION =~ /truffleruby/ || RUBY_DESCRIPTION =~ /jruby/ @@ -17,7 +17,7 @@ def setup @context = MiniRacer::Context.new searcher_js_path = File.expand_path( - '../../lib/rdoc/generator/template/json_index/js/searcher.js', + '../../../../lib/rdoc/generator/template/json_index/js/searcher.js', __dir__ ) searcher_js = File.read(searcher_js_path) diff --git a/test/rdoc/rdoc_generator_json_index_test.rb b/test/rdoc/generator/json_index_test.rb similarity index 99% rename from test/rdoc/rdoc_generator_json_index_test.rb rename to test/rdoc/generator/json_index_test.rb index aa7a2da0b1..875f114b31 100644 --- a/test/rdoc/rdoc_generator_json_index_test.rb +++ b/test/rdoc/generator/json_index_test.rb @@ -1,7 +1,7 @@ # coding: US-ASCII # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocGeneratorJsonIndexTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_markup_test.rb b/test/rdoc/generator/markup_test.rb similarity index 97% rename from test/rdoc/rdoc_generator_markup_test.rb rename to test/rdoc/generator/markup_test.rb index cd77e67e79..682214267b 100644 --- a/test/rdoc/rdoc_generator_markup_test.rb +++ b/test/rdoc/generator/markup_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocGeneratorMarkupTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_pot_po_entry_test.rb b/test/rdoc/generator/pot/po_entry_test.rb similarity index 98% rename from test/rdoc/rdoc_generator_pot_po_entry_test.rb rename to test/rdoc/generator/pot/po_entry_test.rb index d058ff3f40..c21b7c7af4 100644 --- a/test/rdoc/rdoc_generator_pot_po_entry_test.rb +++ b/test/rdoc/generator/pot/po_entry_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../../helper' class RDocGeneratorPOTPOEntryTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_pot_po_test.rb b/test/rdoc/generator/pot/po_test.rb similarity index 97% rename from test/rdoc/rdoc_generator_pot_po_test.rb rename to test/rdoc/generator/pot/po_test.rb index 83b4a5f1c3..962f0dad24 100644 --- a/test/rdoc/rdoc_generator_pot_po_test.rb +++ b/test/rdoc/generator/pot/po_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../../helper' class RDocGeneratorPOTPOTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_pot_test.rb b/test/rdoc/generator/pot_test.rb similarity index 98% rename from test/rdoc/rdoc_generator_pot_test.rb rename to test/rdoc/generator/pot_test.rb index 736f9765e5..558e3a16a0 100644 --- a/test/rdoc/rdoc_generator_pot_test.rb +++ b/test/rdoc/generator/pot_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocGeneratorPOTTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_generator_ri_test.rb b/test/rdoc/generator/ri_test.rb similarity index 98% rename from test/rdoc/rdoc_generator_ri_test.rb rename to test/rdoc/generator/ri_test.rb index 9109d22067..ca4ee58f9e 100644 --- a/test/rdoc/rdoc_generator_ri_test.rb +++ b/test/rdoc/generator/ri_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocGeneratorRITest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_attribute_manager_test.rb b/test/rdoc/markup/attribute_manager_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_attribute_manager_test.rb rename to test/rdoc/markup/attribute_manager_test.rb index 05bd951990..a60bd4bf15 100644 --- a/test/rdoc/rdoc_markup_attribute_manager_test.rb +++ b/test/rdoc/markup/attribute_manager_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupAttributeManagerTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_attributes_test.rb b/test/rdoc/markup/attributes_test.rb similarity index 97% rename from test/rdoc/rdoc_markup_attributes_test.rb rename to test/rdoc/markup/attributes_test.rb index f584a4762a..b46b7a0bf9 100644 --- a/test/rdoc/rdoc_markup_attributes_test.rb +++ b/test/rdoc/markup/attributes_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupAttributesTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_document_test.rb b/test/rdoc/markup/document_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_document_test.rb rename to test/rdoc/markup/document_test.rb index 6b118f4e54..e080bce29f 100644 --- a/test/rdoc/rdoc_markup_document_test.rb +++ b/test/rdoc/markup/document_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupDocumentTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_formatter_test.rb b/test/rdoc/markup/formatter_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_formatter_test.rb rename to test/rdoc/markup/formatter_test.rb index ee27f24e67..e17fa7725d 100644 --- a/test/rdoc/rdoc_markup_formatter_test.rb +++ b/test/rdoc/markup/formatter_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupFormatterTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_hard_break_test.rb b/test/rdoc/markup/hard_break_test.rb similarity index 94% rename from test/rdoc/rdoc_markup_hard_break_test.rb rename to test/rdoc/markup/hard_break_test.rb index 8ec8ffcfed..7ba60fe71f 100644 --- a/test/rdoc/rdoc_markup_hard_break_test.rb +++ b/test/rdoc/markup/hard_break_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupHardBreakTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_heading_test.rb b/test/rdoc/markup/heading_test.rb similarity index 96% rename from test/rdoc/rdoc_markup_heading_test.rb rename to test/rdoc/markup/heading_test.rb index 3bf58ed5f7..0fb83a329d 100644 --- a/test/rdoc/rdoc_markup_heading_test.rb +++ b/test/rdoc/markup/heading_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupHeadingTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_include_test.rb b/test/rdoc/markup/include_test.rb similarity index 93% rename from test/rdoc/rdoc_markup_include_test.rb rename to test/rdoc/markup/include_test.rb index 1544d25bee..5bb596d802 100644 --- a/test/rdoc/rdoc_markup_include_test.rb +++ b/test/rdoc/markup/include_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupIncludeTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_indented_paragraph_test.rb b/test/rdoc/markup/indented_paragraph_test.rb similarity index 97% rename from test/rdoc/rdoc_markup_indented_paragraph_test.rb rename to test/rdoc/markup/indented_paragraph_test.rb index 3be73b81db..5bf5feb689 100644 --- a/test/rdoc/rdoc_markup_indented_paragraph_test.rb +++ b/test/rdoc/markup/indented_paragraph_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupIndentedParagraphTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_test.rb b/test/rdoc/markup/markup_test.rb similarity index 97% rename from test/rdoc/rdoc_markup_test.rb rename to test/rdoc/markup/markup_test.rb index d9d3d25e22..9945d83ef1 100644 --- a/test/rdoc/rdoc_markup_test.rb +++ b/test/rdoc/markup/markup_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_paragraph_test.rb b/test/rdoc/markup/paragraph_test.rb similarity index 95% rename from test/rdoc/rdoc_markup_paragraph_test.rb rename to test/rdoc/markup/paragraph_test.rb index 0f1b96e123..a9cd926372 100644 --- a/test/rdoc/rdoc_markup_paragraph_test.rb +++ b/test/rdoc/markup/paragraph_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupParagraphTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_parser_test.rb b/test/rdoc/markup/parser_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_parser_test.rb rename to test/rdoc/markup/parser_test.rb index c157d9c213..8b3884f031 100644 --- a/test/rdoc/rdoc_markup_parser_test.rb +++ b/test/rdoc/markup/parser_test.rb @@ -1,7 +1,7 @@ # coding: utf-8 # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupParserTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_pre_process_test.rb b/test/rdoc/markup/pre_process_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_pre_process_test.rb rename to test/rdoc/markup/pre_process_test.rb index 2a8cd92dd0..b84ecfdd20 100644 --- a/test/rdoc/rdoc_markup_pre_process_test.rb +++ b/test/rdoc/markup/pre_process_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDoc::Markup::PreProcessTest < RDoc::TestCase @@ -11,7 +11,7 @@ def setup @file_name = File.basename @tempfile.path @dir = File.dirname @tempfile.path - @pp = RDoc::Markup::PreProcess.new @tempfile.path, [@dir, File.dirname(__FILE__)] + @pp = RDoc::Markup::PreProcess.new @tempfile.path, [@dir, File.expand_path('..', File.dirname(__FILE__))] end def teardown diff --git a/test/rdoc/rdoc_markup_raw_test.rb b/test/rdoc/markup/raw_test.rb similarity index 91% rename from test/rdoc/rdoc_markup_raw_test.rb rename to test/rdoc/markup/raw_test.rb index a1599ebb6c..c52bab4f45 100644 --- a/test/rdoc/rdoc_markup_raw_test.rb +++ b/test/rdoc/markup/raw_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupRawTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_to_ansi_test.rb b/test/rdoc/markup/to_ansi_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_ansi_test.rb rename to test/rdoc/markup/to_ansi_test.rb index 020f546997..edfc9d5645 100644 --- a/test/rdoc/rdoc_markup_to_ansi_test.rb +++ b/test/rdoc/markup/to_ansi_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToAnsiTest < RDoc::Markup::TextFormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_bs_test.rb b/test/rdoc/markup/to_bs_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_bs_test.rb rename to test/rdoc/markup/to_bs_test.rb index d89d784422..bbdcfc164d 100644 --- a/test/rdoc/rdoc_markup_to_bs_test.rb +++ b/test/rdoc/markup/to_bs_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToBsTest < RDoc::Markup::TextFormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_html_crossref_test.rb b/test/rdoc/markup/to_html_crossref_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_html_crossref_test.rb rename to test/rdoc/markup/to_html_crossref_test.rb index 820aade4d0..3f5377cdba 100644 --- a/test/rdoc/rdoc_markup_to_html_crossref_test.rb +++ b/test/rdoc/markup/to_html_crossref_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'xref_test_case' +require_relative '../xref_test_case' require 'rdoc/markdown' class RDocMarkupToHtmlCrossrefTest < XrefTestCase diff --git a/test/rdoc/rdoc_markup_to_html_snippet_test.rb b/test/rdoc/markup/to_html_snippet_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_html_snippet_test.rb rename to test/rdoc/markup/to_html_snippet_test.rb index 4a338271af..a9bc00eef3 100644 --- a/test/rdoc/rdoc_markup_to_html_snippet_test.rb +++ b/test/rdoc/markup/to_html_snippet_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToHtmlSnippetTest < RDoc::Markup::FormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_html_test.rb b/test/rdoc/markup/to_html_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_html_test.rb rename to test/rdoc/markup/to_html_test.rb index cb6774679b..caa11c3e7f 100644 --- a/test/rdoc/rdoc_markup_to_html_test.rb +++ b/test/rdoc/markup/to_html_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToHtmlTest < RDoc::Markup::FormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_joined_paragraph_test.rb b/test/rdoc/markup/to_joined_paragraph_test.rb similarity index 95% rename from test/rdoc/rdoc_markup_to_joined_paragraph_test.rb rename to test/rdoc/markup/to_joined_paragraph_test.rb index 89e9736e8a..bfe58ae135 100644 --- a/test/rdoc/rdoc_markup_to_joined_paragraph_test.rb +++ b/test/rdoc/markup/to_joined_paragraph_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToJoinedParagraphTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_markup_to_label_test.rb b/test/rdoc/markup/to_label_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_label_test.rb rename to test/rdoc/markup/to_label_test.rb index a56480de84..cde1a66d87 100644 --- a/test/rdoc/rdoc_markup_to_label_test.rb +++ b/test/rdoc/markup/to_label_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToLabelTest < RDoc::Markup::FormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_markdown_test.rb b/test/rdoc/markup/to_markdown_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_markdown_test.rb rename to test/rdoc/markup/to_markdown_test.rb index 86fe5ce82b..2dcab59616 100644 --- a/test/rdoc/rdoc_markup_to_markdown_test.rb +++ b/test/rdoc/markup/to_markdown_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToMarkdownTest < RDoc::Markup::TextFormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_rdoc_test.rb b/test/rdoc/markup/to_rdoc_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_rdoc_test.rb rename to test/rdoc/markup/to_rdoc_test.rb index c7d6120c0d..4f44e57d34 100644 --- a/test/rdoc/rdoc_markup_to_rdoc_test.rb +++ b/test/rdoc/markup/to_rdoc_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToRDocTest < RDoc::Markup::TextFormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_table_of_contents_test.rb b/test/rdoc/markup/to_table_of_contents_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_table_of_contents_test.rb rename to test/rdoc/markup/to_table_of_contents_test.rb index 3fb6fdeb42..c81f155e9a 100644 --- a/test/rdoc/rdoc_markup_to_table_of_contents_test.rb +++ b/test/rdoc/markup/to_table_of_contents_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToTableOfContentsTest < RDoc::Markup::FormatterTestCase diff --git a/test/rdoc/rdoc_markup_to_tt_only_test.rb b/test/rdoc/markup/to_tt_only_test.rb similarity index 99% rename from test/rdoc/rdoc_markup_to_tt_only_test.rb rename to test/rdoc/markup/to_tt_only_test.rb index e5dfc0be96..e982a587e1 100644 --- a/test/rdoc/rdoc_markup_to_tt_only_test.rb +++ b/test/rdoc/markup/to_tt_only_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupToTtOnlyTest < RDoc::Markup::FormatterTestCase diff --git a/test/rdoc/rdoc_markup_verbatim_test.rb b/test/rdoc/markup/verbatim_test.rb similarity index 93% rename from test/rdoc/rdoc_markup_verbatim_test.rb rename to test/rdoc/markup/verbatim_test.rb index 910095c9ab..59b40abaea 100644 --- a/test/rdoc/rdoc_markup_verbatim_test.rb +++ b/test/rdoc/markup/verbatim_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocMarkupVerbatimTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_parser_c_test.rb b/test/rdoc/parser/c_test.rb similarity index 99% rename from test/rdoc/rdoc_parser_c_test.rb rename to test/rdoc/parser/c_test.rb index b01c3b21ca..66a1853499 100644 --- a/test/rdoc/rdoc_parser_c_test.rb +++ b/test/rdoc/parser/c_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' =begin TODO: test call-seq parsing diff --git a/test/rdoc/rdoc_parser_changelog_test.rb b/test/rdoc/parser/changelog_test.rb similarity index 99% rename from test/rdoc/rdoc_parser_changelog_test.rb rename to test/rdoc/parser/changelog_test.rb index 4557eacae1..562a1c96e3 100644 --- a/test/rdoc/rdoc_parser_changelog_test.rb +++ b/test/rdoc/parser/changelog_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocParserChangeLogTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_parser_markdown_test.rb b/test/rdoc/parser/markdown_test.rb similarity index 97% rename from test/rdoc/rdoc_parser_markdown_test.rb rename to test/rdoc/parser/markdown_test.rb index 49da5693d6..194d105b49 100644 --- a/test/rdoc/rdoc_parser_markdown_test.rb +++ b/test/rdoc/parser/markdown_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocParserMarkdownTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_parser_test.rb b/test/rdoc/parser/parser_test.rb similarity index 91% rename from test/rdoc/rdoc_parser_test.rb rename to test/rdoc/parser/parser_test.rb index 7b890f703d..e061a76262 100644 --- a/test/rdoc/rdoc_parser_test.rb +++ b/test/rdoc/parser/parser_test.rb @@ -1,14 +1,14 @@ # -*- coding: us-ascii -*- # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocParserTest < RDoc::TestCase def setup super @RP = RDoc::Parser - @binary_dat_fixture_path = File.expand_path '../binary.dat', __FILE__ + @binary_dat_fixture_path = File.expand_path '../../binary.dat', __FILE__ @options = RDoc::Options.new end @@ -38,7 +38,7 @@ def test_class_binary_eh_marshal end def test_class_binary_japanese_text - file_name = File.expand_path '../test.ja.txt', __FILE__ + file_name = File.expand_path '../../test.ja.txt', __FILE__ refute @RP.binary?(file_name) end @@ -47,7 +47,7 @@ def test_class_binary_large_japanese_rdoc begin extenc, Encoding.default_external = Encoding.default_external, Encoding::US_ASCII - file_name = File.expand_path '../test.ja.largedoc', __FILE__ + file_name = File.expand_path '../../test.ja.largedoc', __FILE__ assert !@RP.binary?(file_name) ensure Encoding.default_external = extenc @@ -56,29 +56,29 @@ def test_class_binary_large_japanese_rdoc end def test_class_binary_japanese_rdoc - file_name = File.expand_path '../test.ja.rdoc', __FILE__ + file_name = File.expand_path '../../test.ja.rdoc', __FILE__ refute @RP.binary?(file_name) end def test_class_can_parse assert_equal @RP.can_parse(__FILE__), @RP::Ruby - readme_file_name = File.expand_path '../test.txt', __FILE__ + readme_file_name = File.expand_path '../../test.txt', __FILE__ assert_equal @RP::Simple, @RP.can_parse(readme_file_name) assert_equal @RP::Simple, @RP.can_parse(@binary_dat_fixture_path) - jtest_file_name = File.expand_path '../test.ja.txt', __FILE__ + jtest_file_name = File.expand_path '../../test.ja.txt', __FILE__ assert_equal @RP::Simple, @RP.can_parse(jtest_file_name) - jtest_rdoc_file_name = File.expand_path '../test.ja.rdoc', __FILE__ + jtest_rdoc_file_name = File.expand_path '../../test.ja.rdoc', __FILE__ assert_equal @RP::Simple, @RP.can_parse(jtest_rdoc_file_name) - readme_file_name = File.expand_path '../README', __FILE__ + readme_file_name = File.expand_path '../../README', __FILE__ assert_equal @RP::Simple, @RP.can_parse(readme_file_name) - jtest_largerdoc_file_name = File.expand_path '../test.ja.largedoc', __FILE__ + jtest_largerdoc_file_name = File.expand_path '../../test.ja.largedoc', __FILE__ assert_equal @RP::Simple, @RP.can_parse(jtest_largerdoc_file_name) @RP.alias_extension 'rdoc', 'largedoc' @@ -156,7 +156,7 @@ def test_can_parse_modeline_c # Selenium hides a .jar file using a .txt extension. def test_class_can_parse_zip - hidden_zip = File.expand_path '../hidden.zip.txt', __FILE__ + hidden_zip = File.expand_path '../../hidden.zip.txt', __FILE__ assert_nil @RP.can_parse(hidden_zip) end diff --git a/test/rdoc/rdoc_parser_prism_ruby_test.rb b/test/rdoc/parser/prism_ruby_test.rb similarity index 99% rename from test/rdoc/rdoc_parser_prism_ruby_test.rb rename to test/rdoc/parser/prism_ruby_test.rb index 578123b740..d3e418575b 100644 --- a/test/rdoc/rdoc_parser_prism_ruby_test.rb +++ b/test/rdoc/parser/prism_ruby_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' require 'rdoc/parser' require 'rdoc/parser/prism_ruby' diff --git a/test/rdoc/rdoc_parser_rd_test.rb b/test/rdoc/parser/rd_test.rb similarity index 97% rename from test/rdoc/rdoc_parser_rd_test.rb rename to test/rdoc/parser/rd_test.rb index a1e552252a..d45b64b99a 100644 --- a/test/rdoc/rdoc_parser_rd_test.rb +++ b/test/rdoc/parser/rd_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocParserRdTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_parser_ruby_test.rb b/test/rdoc/parser/ruby_test.rb similarity index 99% rename from test/rdoc/rdoc_parser_ruby_test.rb rename to test/rdoc/parser/ruby_test.rb index 2f4665a25f..e4546b80db 100644 --- a/test/rdoc/rdoc_parser_ruby_test.rb +++ b/test/rdoc/parser/ruby_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' return if ENV['RDOC_USE_PRISM_PARSER'] diff --git a/test/rdoc/rdoc_parser_simple_test.rb b/test/rdoc/parser/simple_test.rb similarity index 98% rename from test/rdoc/rdoc_parser_simple_test.rb rename to test/rdoc/parser/simple_test.rb index 7296a40064..7ae0660e89 100644 --- a/test/rdoc/rdoc_parser_simple_test.rb +++ b/test/rdoc/parser/simple_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocParserSimpleTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_rd_block_parser_test.rb b/test/rdoc/rd/block_parser_test.rb similarity index 99% rename from test/rdoc/rdoc_rd_block_parser_test.rb rename to test/rdoc/rd/block_parser_test.rb index 50bf075a5a..2c2c4e7de8 100644 --- a/test/rdoc/rdoc_rd_block_parser_test.rb +++ b/test/rdoc/rd/block_parser_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRdBlockParserTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_rd_inline_parser_test.rb b/test/rdoc/rd/inline_parser_test.rb similarity index 99% rename from test/rdoc/rdoc_rd_inline_parser_test.rb rename to test/rdoc/rd/inline_parser_test.rb index e484dbe833..5a6fcab6d0 100644 --- a/test/rdoc/rdoc_rd_inline_parser_test.rb +++ b/test/rdoc/rd/inline_parser_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRdInlineParserTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_rd_inline_test.rb b/test/rdoc/rd/inline_test.rb similarity index 97% rename from test/rdoc/rdoc_rd_inline_test.rb rename to test/rdoc/rd/inline_test.rb index c4984949f4..7970aec7ad 100644 --- a/test/rdoc/rdoc_rd_inline_test.rb +++ b/test/rdoc/rd/inline_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRdInlineTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_rd_test.rb b/test/rdoc/rd/rd_test.rb similarity index 95% rename from test/rdoc/rdoc_rd_test.rb rename to test/rdoc/rd/rd_test.rb index 8842aaccbe..9fe3791790 100644 --- a/test/rdoc/rdoc_rd_test.rb +++ b/test/rdoc/rd/rd_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRdTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_ri_driver_test.rb b/test/rdoc/ri/driver_test.rb similarity index 99% rename from test/rdoc/rdoc_ri_driver_test.rb rename to test/rdoc/ri/driver_test.rb index a0c4d809a7..2d1a2ce741 100644 --- a/test/rdoc/rdoc_ri_driver_test.rb +++ b/test/rdoc/ri/driver_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRIDriverTest < RDoc::TestCase diff --git a/test/rdoc/rdoc_ri_paths_test.rb b/test/rdoc/ri/paths_test.rb similarity index 99% rename from test/rdoc/rdoc_ri_paths_test.rb rename to test/rdoc/ri/paths_test.rb index 7a9fc6fde4..97af41fd9d 100644 --- a/test/rdoc/rdoc_ri_paths_test.rb +++ b/test/rdoc/ri/paths_test.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'helper' +require_relative '../helper' class RDocRIPathsTest < RDoc::TestCase