<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/tool/lib/test, branch v3_0_4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 5086c25f6015558877f85c3f1c014780b08fd3ce,3ff0a0b40c2e1fbdad2286f1dafe837f822d0e0d: [Backport #16936]</title>
<updated>2021-12-24T05:41:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-12-24T05:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d29740c1b101db4bd8fc2d05f929a9e37471a0f'/>
<id>1d29740c1b101db4bd8fc2d05f929a9e37471a0f</id>
<content type='text'>
	Properly exclude test cases.

	Lets consider the following scenario:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):001:0&gt; p suite
	OpenSSL::TestEC
	=&gt; OpenSSL::TestEC

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):002:0&gt; p all_test_methods
	["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
	=&gt;
	["test_ECPrivateKey",
	 "test_ECPrivateKey_encrypted",
	 "test_PUBKEY",
	 "test_check_key",
	 "test_derive_key",
	 "test_dh_compute_key",
	 "test_dsa_sign_asn1_FIPS186_3",
	 "test_ec_group",
	 "test_ec_key",
	 "test_ec_point",
	 "test_ec_point_add",
	 "test_ec_point_mul",
	 "test_generate",
	 "test_marshal",
	 "test_sign_verify",
	 "test_sign_verify_raw"]

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):003:0&gt; p filter
	/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
	=&gt; /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):004:0&gt; method = "test_check_key"
	=&gt; "test_check_key"
	~~~

	The intention here is to exclude the `test_check_key` test case.
	Unfortunately this does not work as expected, because the negative filter
	is never checked:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):005:0&gt; filter === method
	=&gt; true

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):006:0&gt; filter === "#{suite}##{method}"
	=&gt; false

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):007:0&gt; filter === method || filter === "#{suite}##{method}"
	=&gt; true
	~~~

	Therefore always filter against the fully qualified method name
	`#{suite}##{method}`, which should provide the expected result.

	However, if plain string filter is used, keep checking also only the
	method name.

	This resolves [Bug #16936].
	---
	 tool/lib/test/unit.rb | 12 +++++++++---
	 1 file changed, 9 insertions(+), 3 deletions(-)

	Filter method names only if filtering method name only

	If sole `filter` option doesn't seem including test case name,
	match with method name only.
	And if the filter is a Regexp or String, it never matches method
	name symbols.
	---
	 tool/lib/test/unit.rb | 15 ++++++---------
	 1 file changed, 6 insertions(+), 9 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Properly exclude test cases.

	Lets consider the following scenario:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):001:0&gt; p suite
	OpenSSL::TestEC
	=&gt; OpenSSL::TestEC

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):002:0&gt; p all_test_methods
	["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
	=&gt;
	["test_ECPrivateKey",
	 "test_ECPrivateKey_encrypted",
	 "test_PUBKEY",
	 "test_check_key",
	 "test_derive_key",
	 "test_dh_compute_key",
	 "test_dsa_sign_asn1_FIPS186_3",
	 "test_ec_group",
	 "test_ec_key",
	 "test_ec_point",
	 "test_ec_point_add",
	 "test_ec_point_mul",
	 "test_generate",
	 "test_marshal",
	 "test_sign_verify",
	 "test_sign_verify_raw"]

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):003:0&gt; p filter
	/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
	=&gt; /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):004:0&gt; method = "test_check_key"
	=&gt; "test_check_key"
	~~~

	The intention here is to exclude the `test_check_key` test case.
	Unfortunately this does not work as expected, because the negative filter
	is never checked:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):005:0&gt; filter === method
	=&gt; true

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):006:0&gt; filter === "#{suite}##{method}"
	=&gt; false

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):007:0&gt; filter === method || filter === "#{suite}##{method}"
	=&gt; true
	~~~

	Therefore always filter against the fully qualified method name
	`#{suite}##{method}`, which should provide the expected result.

	However, if plain string filter is used, keep checking also only the
	method name.

	This resolves [Bug #16936].
	---
	 tool/lib/test/unit.rb | 12 +++++++++---
	 1 file changed, 9 insertions(+), 3 deletions(-)

	Filter method names only if filtering method name only

	If sole `filter` option doesn't seem including test case name,
	match with method name only.
	And if the filter is a Regexp or String, it never matches method
	name symbols.
	---
	 tool/lib/test/unit.rb | 15 ++++++---------
	 1 file changed, 6 insertions(+), 9 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass keyword options in assert_syntax_error</title>
<updated>2020-12-23T16:24:30+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-12-23T16:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb545743932a5efd5a34ed9da981248dae3cc5ff'/>
<id>fb545743932a5efd5a34ed9da981248dae3cc5ff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] Workaround for non-ruby repository like ruby/date, flori/json</title>
<updated>2020-12-23T04:53:40+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-23T04:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=61bd28b836190bbc8ce110e780da4c4aad9f485b'/>
<id>61bd28b836190bbc8ce110e780da4c4aad9f485b</id>
<content type='text'>
https://github.com/ruby/date/commit/1ff7fa2d80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/1ff7fa2d80
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `require_relative` option to `assert_ractor`</title>
<updated>2020-12-21T03:00:05+00:00</updated>
<author>
<name>Marc-Andre Lafortune</name>
<email>github@marc-andre.ca</email>
</author>
<published>2020-12-21T02:51:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1ecac8e4d031c244df711d573fa73ce339ffa2f5'/>
<id>1ecac8e4d031c244df711d573fa73ce339ffa2f5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>`assert_ractor` tweak. Thanks Nobu</title>
<updated>2020-12-20T03:37:27+00:00</updated>
<author>
<name>Marc-Andre Lafortune</name>
<email>github@marc-andre.ca</email>
</author>
<published>2020-12-20T03:37:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b1b6dbfdc3abaca44e971979328fd396b424c32a'/>
<id>b1b6dbfdc3abaca44e971979328fd396b424c32a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `assert_ractor` [Feature #17367]</title>
<updated>2020-12-19T22:13:08+00:00</updated>
<author>
<name>Marc-Andre Lafortune</name>
<email>github@marc-andre.ca</email>
</author>
<published>2020-12-19T17:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=70f20234b297a7fc9940bace30101813aa9df052'/>
<id>70f20234b297a7fc9940bace30101813aa9df052</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use category: :deprecated in warnings that are related to deprecation</title>
<updated>2020-12-18T17:54:11+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2020-09-28T17:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=05313c914b29f7027b27a91021ae2662f0149e54'/>
<id>05313c914b29f7027b27a91021ae2662f0149e54</id>
<content type='text'>
Also document that both :deprecated and :experimental are supported
:category option values.

The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.

Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).

Add assert_deprecated_warn to test assertions.  Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also document that both :deprecated and :experimental are supported
:category option values.

The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.

Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).

Add assert_deprecated_warn to test assertions.  Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
</pre>
</div>
</content>
</entry>
<entry>
<title>test/ruby: Check warning messages at a finer granularity</title>
<updated>2020-12-17T11:06:18+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-12-17T11:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9908177857a28633d6279c43a1ad4dfedcb98596'/>
<id>9908177857a28633d6279c43a1ad4dfedcb98596</id>
<content type='text'>
Instead of suppressing all warnings wholly in each test scripts by
setting `$VERBOSE` to `nil` in `setup` methods.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of suppressing all warnings wholly in each test scripts by
setting `$VERBOSE` to `nil` in `setup` methods.
</pre>
</div>
</content>
</entry>
<entry>
<title>Debug the command used for gdb dump</title>
<updated>2020-12-14T07:35:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-14T07:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aacd2295d0f2c982641229e159ff179462d83a36'/>
<id>aacd2295d0f2c982641229e159ff179462d83a36</id>
<content type='text'>
It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm
debugging why.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm
debugging why.
</pre>
</div>
</content>
</entry>
<entry>
<title>Dump a backtrace with gdb</title>
<updated>2020-12-13T02:46:24+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-13T02:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=246d7e4f1d92851356d459f424cbc3491135d1ac'/>
<id>246d7e4f1d92851356d459f424cbc3491135d1ac</id>
<content type='text'>
Because Ruby often fails to dump a C backtrace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because Ruby often fails to dump a C backtrace.
</pre>
</div>
</content>
</entry>
</feed>
