aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-08-03 10:47:40 +0200
committergit <svn-admin@ruby-lang.org>2022-08-05 16:37:03 +0900
commitf310ac1cb2964f635f582862763b2155aacf2c12 (patch)
treeb121ba32a0064fb35f5446b6bc9c3f27596564bc /test
parent5a9db23734e76c2915f1ccb8f87e992bc831598b (diff)
downloadruby-f310ac1cb2964f635f582862763b2155aacf2c12.tar.gz
[rubygems/rubygems] Include backtrace with crashes by default
https://github.com/rubygems/rubygems/commit/3cc3bfd371
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_config_file.rb22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index fbc7c85757..e23773a133 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -35,7 +35,7 @@ class TestGemConfigFile < Gem::TestCase
def test_initialize
assert_equal @temp_conf, @cfg.config_file_name
- assert_equal false, @cfg.backtrace
+ assert_equal true, @cfg.backtrace
assert_equal true, @cfg.update_sources
assert_equal Gem::ConfigFile::DEFAULT_BULK_THRESHOLD, @cfg.bulk_threshold
assert_equal true, @cfg.verbose
@@ -239,6 +239,12 @@ if you believe they were disclosed to a third party.
end
def test_handle_arguments_backtrace
+ File.open @temp_conf, "w" do |fp|
+ fp.puts ":backtrace: false"
+ end
+
+ util_config_file %W[--config-file=#{@temp_conf}]
+
assert_equal false, @cfg.backtrace
args = %w[--backtrace]
@@ -275,6 +281,12 @@ if you believe they were disclosed to a third party.
end
def test_handle_arguments_traceback
+ File.open @temp_conf, "w" do |fp|
+ fp.puts ":backtrace: false"
+ end
+
+ util_config_file %W[--config-file=#{@temp_conf}]
+
assert_equal false, @cfg.backtrace
args = %w[--traceback]
@@ -288,7 +300,7 @@ if you believe they were disclosed to a third party.
assert_equal @temp_conf, @cfg.config_file_name
File.open @temp_conf, "w" do |fp|
- fp.puts ":backtrace: true"
+ fp.puts ":backtrace: false"
fp.puts ":update_sources: false"
fp.puts ":bulk_threshold: 10"
fp.puts ":verbose: false"
@@ -300,7 +312,7 @@ if you believe they were disclosed to a third party.
util_config_file args
- assert_equal false, @cfg.backtrace
+ assert_equal true, @cfg.backtrace
assert_equal true, @cfg.update_sources
assert_equal Gem::ConfigFile::DEFAULT_BULK_THRESHOLD, @cfg.bulk_threshold
assert_equal true, @cfg.verbose
@@ -386,7 +398,7 @@ if you believe they were disclosed to a third party.
end
def test_write
- @cfg.backtrace = true
+ @cfg.backtrace = false
@cfg.update_sources = false
@cfg.bulk_threshold = 10
@cfg.verbose = false
@@ -398,7 +410,7 @@ if you believe they were disclosed to a third party.
util_config_file
# These should not be written out to the config file.
- assert_equal false, @cfg.backtrace, "backtrace"
+ assert_equal true, @cfg.backtrace, "backtrace"
assert_equal Gem::ConfigFile::DEFAULT_BULK_THRESHOLD, @cfg.bulk_threshold,
"bulk_threshold"
assert_equal true, @cfg.update_sources, "update_sources"