[前][次][番号順一覧][スレッド一覧]

ruby-changes:66405

From: Benoit <ko1@a...>
Date: Wed, 2 Jun 2021 21:42:26 +0900 (JST)
Subject: [ruby-changes:66405] 22e2a6a999 (master): Update to ruby/spec@a0b7d0d

https://git.ruby-lang.org/ruby.git/commit/?id=22e2a6a999

From 22e2a6a999b958efe5d84d9c7314e450fda82254 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Wed, 2 Jun 2021 14:34:07 +0200
Subject: Update to ruby/spec@a0b7d0d

---
 spec/ruby/README.md                                |   2 +-
 spec/ruby/command_line/dash_encoding_spec.rb       |   8 +-
 spec/ruby/command_line/dash_r_spec.rb              |   2 +-
 spec/ruby/command_line/dash_upper_e_spec.rb        |   3 +-
 spec/ruby/command_line/dash_upper_s_spec.rb        |   2 +-
 spec/ruby/command_line/dash_upper_u_spec.rb        |   6 +-
 spec/ruby/command_line/dash_x_spec.rb              |   2 +-
 spec/ruby/command_line/error_message_spec.rb       |   4 +-
 spec/ruby/command_line/rubyopt_spec.rb             |  40 ++---
 spec/ruby/command_line/syntax_error_spec.rb        |   4 +-
 spec/ruby/core/array/element_set_spec.rb           |   8 +
 spec/ruby/core/encoding/replicate_spec.rb          |  21 +++
 spec/ruby/core/enumerator/lazy/filter_map_spec.rb  |  16 ++
 spec/ruby/core/exception/signal_exception_spec.rb  |   6 +-
 spec/ruby/core/exception/system_exit_spec.rb       |   4 +-
 spec/ruby/core/exception/top_level_spec.rb         |   6 +-
 spec/ruby/core/fiber/raise_spec.rb                 |  20 +++
 spec/ruby/core/file/atime_spec.rb                  |  23 ++-
 spec/ruby/core/file/basename_spec.rb               |  15 ++
 spec/ruby/core/hash/rehash_spec.rb                 |  18 ++
 spec/ruby/core/io/binmode_spec.rb                  |   4 +
 spec/ruby/core/io/dup_spec.rb                      |  19 +++
 spec/ruby/core/io/external_encoding_spec.rb        |   5 +
 spec/ruby/core/io/internal_encoding_spec.rb        |   5 +
 spec/ruby/core/io/lineno_spec.rb                   |  36 ++++
 spec/ruby/core/io/set_encoding_by_bom_spec.rb      |  14 ++
 spec/ruby/core/io/sysread_spec.rb                  |   5 +
 spec/ruby/core/io/sysseek_spec.rb                  |   5 +
 spec/ruby/core/kernel/at_exit_spec.rb              |  11 +-
 spec/ruby/core/kernel/eval_spec.rb                 |  65 ++++---
 spec/ruby/core/kernel/format_spec.rb               |   1 +
 spec/ruby/core/kernel/inspect_spec.rb              |   8 +
 spec/ruby/core/kernel/shared/sprintf.rb            |  17 ++
 spec/ruby/core/module/define_method_spec.rb        |  46 +++++
 spec/ruby/core/module/include_spec.rb              | 142 ++++++++++++++++
 spec/ruby/core/module/prepend_spec.rb              | 186 +++++++++++++++++++++
 spec/ruby/core/module/remove_method_spec.rb        |  22 +++
 spec/ruby/core/objectspace/_id2ref_spec.rb         |  41 ++++-
 .../ruby/core/objectspace/define_finalizer_spec.rb |   2 +-
 spec/ruby/core/process/status/equal_value_spec.rb  |   4 +-
 spec/ruby/core/process/status/exited_spec.rb       |   7 +-
 spec/ruby/core/process/status/exitstatus_spec.rb   |   4 +-
 spec/ruby/core/process/status/signaled_spec.rb     |   6 +-
 spec/ruby/core/process/status/success_spec.rb      |  14 +-
 spec/ruby/core/process/status/termsig_spec.rb      |   4 +-
 spec/ruby/core/process/status/to_i_spec.rb         |   4 +-
 spec/ruby/core/range/step_spec.rb                  |  39 +++--
 spec/ruby/core/signal/trap_spec.rb                 |   2 +-
 spec/ruby/core/string/inspect_spec.rb              |   6 +
 spec/ruby/core/string/rpartition_spec.rb           |  13 ++
 spec/ruby/core/string/split_spec.rb                |  10 ++
 spec/ruby/core/struct/dig_spec.rb                  |  10 ++
 spec/ruby/language/fixtures/return.rb              |   8 +-
 spec/ruby/language/hash_spec.rb                    |  15 ++
 spec/ruby/language/source_encoding_spec.rb         |   4 +-
 spec/ruby/library/datetime/strftime_spec.rb        |   1 +
 spec/ruby/library/rbconfig/rbconfig_spec.rb        |   8 +-
 .../rubygems/gem/load_path_insert_index_spec.rb    |  10 ++
 spec/ruby/optional/capi/data_spec.rb               |   7 +
 spec/ruby/optional/capi/ext/data_spec.c            |   6 +
 spec/ruby/optional/capi/ext/object_spec.c          |   6 +
 spec/ruby/optional/capi/ext/typed_data_spec.c      |   6 +
 spec/ruby/optional/capi/object_spec.rb             |  33 +++-
 spec/ruby/optional/capi/typed_data_spec.rb         |  11 ++
 spec/ruby/shared/process/exit.rb                   |  10 +-
 spec/ruby/shared/time/strftime_for_time.rb         |   8 +
 66 files changed, 938 insertions(+), 162 deletions(-)
 create mode 100644 spec/ruby/core/enumerator/lazy/filter_map_spec.rb
 create mode 100644 spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb

diff --git a/spec/ruby/README.md b/spec/ruby/README.md
index 8bdba2c..c5b7d6f 100644
--- a/spec/ruby/README.md
+++ b/spec/ruby/README.md
@@ -30,7 +30,7 @@ ruby/spec is known to be tested in these implementations for every commit: https://github.com/ruby/ruby/blob/trunk/spec/ruby/README.md#L30
 * [Opal](https://github.com/opal/opal/tree/master/spec)
 
 ruby/spec describes the behavior of Ruby 2.5 and more recent Ruby versions.
-More precisely, every latest stable MRI release should [pass](https://travis-ci.org/ruby/spec) all specs of ruby/spec (2.5.x, 2.6.x, 2.7.x, etc), and those are tested in TravisCI.
+More precisely, every latest stable MRI release should [pass](https://github.com/ruby/spec/actions/workflows/ci.yml) all specs of ruby/spec (2.5.x, 2.6.x, 2.7.x, etc), and those are tested in CI.
 
 ### Synchronization with Ruby Implementations
 
diff --git a/spec/ruby/command_line/dash_encoding_spec.rb b/spec/ruby/command_line/dash_encoding_spec.rb
index 36ce55a..5803d32 100644
--- a/spec/ruby/command_line/dash_encoding_spec.rb
+++ b/spec/ruby/command_line/dash_encoding_spec.rb
@@ -25,6 +25,12 @@ describe "The --encoding command line option" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_encoding_spec.rb#L25
   end
 
   it "does not accept a third encoding" do
-    ruby_exe(@test_string, options: "--disable-gems --encoding big5:#{@enc2}:utf-32le", args: "2>&1").should =~ /extra argument for --encoding: utf-32le/
+    options = {
+      options: "--disable-gems --encoding big5:#{@enc2}:utf-32le",
+      args: "2>&1",
+      exit_status: 1
+    }
+
+    ruby_exe(@test_string, options).should =~ /extra argument for --encoding: utf-32le/
   end
 end
diff --git a/spec/ruby/command_line/dash_r_spec.rb b/spec/ruby/command_line/dash_r_spec.rb
index 46c000b..ea5bde5 100644
--- a/spec/ruby/command_line/dash_r_spec.rb
+++ b/spec/ruby/command_line/dash_r_spec.rb
@@ -13,7 +13,7 @@ describe "The -r command line option" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_r_spec.rb#L13
   end
 
   it "requires the file before parsing the main script" do
-    out = ruby_exe(fixture(__FILE__, "bad_syntax.rb"), options: "-r #{@test_file}", args: "2>&1")
+    out = ruby_exe(fixture(__FILE__, "bad_syntax.rb"), options: "-r #{@test_file}", args: "2>&1", exit_status: 1)
     $?.should_not.success?
     out.should include("REQUIRED")
     out.should include("syntax error")
diff --git a/spec/ruby/command_line/dash_upper_e_spec.rb b/spec/ruby/command_line/dash_upper_e_spec.rb
index b3c6ce2..5a83962 100644
--- a/spec/ruby/command_line/dash_upper_e_spec.rb
+++ b/spec/ruby/command_line/dash_upper_e_spec.rb
@@ -31,6 +31,7 @@ describe "ruby -E" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_upper_e_spec.rb#L31
   it "raises a RuntimeError if used with -U" do
     ruby_exe("p 1",
              options: '-Eascii:ascii -U',
-             args: '2>&1').should =~ /RuntimeError/
+             args: '2>&1',
+             exit_status: 1).should =~ /RuntimeError/
   end
 end
diff --git a/spec/ruby/command_line/dash_upper_s_spec.rb b/spec/ruby/command_line/dash_upper_s_spec.rb
index 3a28fa2..1799150 100644
--- a/spec/ruby/command_line/dash_upper_s_spec.rb
+++ b/spec/ruby/command_line/dash_upper_s_spec.rb
@@ -21,7 +21,7 @@ describe 'The -S command line option' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_upper_s_spec.rb#L21
     end
 
     it "runs launcher found in PATH and sets the exit status to 1 if it fails" do
-      result = ruby_exe(nil, options: '-S dash_s_fail', env: { 'PATH' => @path }, args: '2>&1')
+      result = ruby_exe(nil, options: '-S dash_s_fail', env: { 'PATH' => @path }, args: '2>&1', exit_status: 1)
       result.should =~ /\bdie\b/
       $?.exitstatus.should == 1
     end
diff --git a/spec/ruby/command_line/dash_upper_u_spec.rb b/spec/ruby/command_line/dash_upper_u_spec.rb
index 2546b5b..d62718b 100644
--- a/spec/ruby/command_line/dash_upper_u_spec.rb
+++ b/spec/ruby/command_line/dash_upper_u_spec.rb
@@ -32,12 +32,14 @@ describe "ruby -U" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_upper_u_spec.rb#L32
   it "raises a RuntimeError if used with -Eext:int" do
     ruby_exe("p 1",
              options: '-U -Eascii:ascii',
-             args: '2>&1').should =~ /RuntimeError/
+             args: '2>&1',
+             exit_status: 1).should =~ /RuntimeError/
   end
 
   it "raises a RuntimeError if used with -E:int" do
     ruby_exe("p 1",
              options: '-U -E:ascii',
-             args: '2>&1').should =~ /RuntimeError/
+             args: '2>&1',
+             exit_status: 1).should =~ /RuntimeError/
   end
 end
diff --git a/spec/ruby/command_line/dash_x_spec.rb b/spec/ruby/command_line/dash_x_spec.rb
index eb89db0..ae14b61 100644
--- a/spec/ruby/command_line/dash_x_spec.rb
+++ b/spec/ruby/command_line/dash_x_spec.rb
@@ -9,7 +9,7 @@ describe "The -x command line option" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_x_spec.rb#L9
 
   it "fails when /\#!.*ruby.*/-ish line in target file is not found" do
     bad_embedded_ruby = fixture __FILE__, "bin/bad_embedded_ruby.txt"
-    result = ruby_exe(bad_embedded_ruby, options: '-x', args: '2>&1')
+    result = ruby_exe(bad_embedded_ruby, options: '-x', args: '2>&1', exit_status: 1)
     result.should include "no Ruby script found in input"
   end
 
diff --git a/spec/ruby/command_line/error_message_spec.rb b/spec/ruby/command_line/error_message_spec.rb
i (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]