1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

10 commits

Author SHA1 Message Date
nagachika
5d4bfaccab merge revision(s) ab3cb29bd9:
Avoid defining the same test class in multiple files

	Should fix issues with parallel testing sometimes not running all
	tests.

	This should be viewed skipping whitespace changes.

	Fixes [Bug #18731]
	---
	 test/-ext-/bignum/test_big2str.rb        |  38 +-
	 test/-ext-/bignum/test_bigzero.rb        |  20 +-
	 test/-ext-/bignum/test_div.rb            |  38 +-
	 test/-ext-/bignum/test_mul.rb            | 260 ++++++------
	 test/-ext-/bignum/test_pack.rb           | 653 +++++++++++++++----------------
	 test/-ext-/bignum/test_str2big.rb        |  52 ++-
	 test/-ext-/funcall/test_funcall.rb       |  11 -
	 test/-ext-/funcall/test_passing_block.rb |   5 +
	 test/date/test_date_ractor.rb            |   2 +-
	 test/fileutils/clobber.rb                |   5 +-
	 test/fileutils/test_dryrun.rb            |   2 +-
	 test/fileutils/test_nowrite.rb           |   2 +-
	 test/fileutils/test_verbose.rb           |   2 +-
	 test/fileutils/visibility_tests.rb       |   5 +-
	 test/mkmf/base.rb                        | 225 ++++++-----
	 test/mkmf/test_config.rb                 |  16 +-
	 test/mkmf/test_constant.rb               |  56 ++-
	 test/mkmf/test_convertible.rb            |  48 ++-
	 test/mkmf/test_egrep_cpp.rb              |  14 +-
	 test/mkmf/test_find_executable.rb        |  82 ++--
	 test/mkmf/test_flags.rb                  |  92 +++--
	 test/mkmf/test_framework.rb              |  70 ++--
	 test/mkmf/test_have_func.rb              |  18 +-
	 test/mkmf/test_have_library.rb           |  84 ++--
	 test/mkmf/test_have_macro.rb             |  46 ++-
	 test/mkmf/test_install.rb                |  38 +-
	 test/mkmf/test_libs.rb                   | 156 ++++----
	 test/mkmf/test_mkmf.rb                   |  14 +-
	 test/mkmf/test_pkg_config.rb             |  98 +++--
	 test/mkmf/test_signedness.rb             |  38 +-
	 test/mkmf/test_sizeof.rb                 |  74 ++--
	 test/optparse/test_acceptable.rb         |   2 +-
	 test/optparse/test_autoconf.rb           |   4 +-
	 test/optparse/test_bash_completion.rb    |   4 +-
	 test/optparse/test_cclass.rb             |   2 +-
	 test/optparse/test_did_you_mean.rb       |   2 +-
	 test/optparse/test_getopts.rb            |   4 +-
	 test/optparse/test_kwargs.rb             |   4 +-
	 test/optparse/test_noarg.rb              |   6 +-
	 test/optparse/test_optarg.rb             |   2 +-
	 test/optparse/test_placearg.rb           |   2 +-
	 test/optparse/test_reqarg.rb             |  10 +-
	 test/optparse/test_summary.rb            |   2 +-
	 test/optparse/test_zsh_completion.rb     |   4 +-
	 test/ruby/enc/test_emoji_breaks.rb       | 207 +++++-----
	 test/ruby/enc/test_grapheme_breaks.rb    | 115 +++---
	 test/ruby/test_inlinecache.rb            |   2 +-
	 47 files changed, 1280 insertions(+), 1356 deletions(-)
	 delete mode 100644 test/-ext-/funcall/test_funcall.rb
2022-10-21 13:36:03 +09:00
nobu
2ad7fb6dc1 optparse: Suppress warnings
Ruby warns "instance variable `@version` not initialized" for optparse when it receives `--version` option.

`test.rb`

```ruby
require 'optparse'
Version = '1'
OptionParser.new.parse(ARGV)
```

```
$ ruby -w test.rb --version
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1168: warning: instance variable @version not initialized
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1175: warning: instance variable @release not initialized
test 1
```

This change will suppress the warnings.

[Fix GH-1871]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-06 09:53:33 +00:00
nobu
db1de35a31 optparse.rb: froze string literals
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 03:41:04 +00:00
naruse
3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nagachika
2bc4268e79 * test/optparse/test_summary.rb (test_summary_containing_space): add
test for r35467. OptionParser#to_a shouldn't split banner by spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-25 16:36:14 +00:00
nobu
3c2f707f16 * lib/optparse.rb (OptionParser#to_a): split for each lines.
[ruby-dev:45568][Bug #6348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 20:46:14 +00:00
nobu
4f2b00429e * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
[ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 06:51:44 +00:00
nobu
a9917efd5d * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
defined.  [ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 05:54:08 +00:00
nobu
85a4f84e79 * test/optparse/test_summary.rb: fixed superclass so that it run
solely.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-22 12:33:33 +00:00
nobu
0a23fe6572 * lib/optparse.rb (OptionParser::List#summarize): gives priority
to latter switches.  [ruby-dev:36692]

* lib/optparse.rb (OptionParser#summarize): do not append
  unnecessary line terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26 06:50:55 +00:00