Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation test when ran multiple times #695

Merged
merged 1 commit into from
Aug 26, 2023
Merged

Commits on Aug 26, 2023

  1. Fix deprecation test when ran multiple times

    The deprecation warning is only printed on the first time the test is
    ran, so subsequent runs will fail because the error message will not be
    printed. This can be seen in the Ruby CI logs such as
    http://ci.rvm.jp/results/trunk-repeat50@ruby-sp2-docker/4696313:
    
        1) Failure:
        TestIRB::RubyLexTest#test_initialising_the_old_top_level_ruby_lex [/tmp/ruby/src/trunk-repeat50/test/irb/test_ruby_lex.rb:210]:
        Expected /warning: constant ::RubyLex is deprecated/ to match "".
    
    It can also be reproduced in the Ruby repo with the following test
    command:
    
        make test/irb/test_ruby_lex.rb TESTOPTS=--repeat-count=2
    
    This commit changes the test to use assert_in_out_err, which spawns a
    new Ruby process.
    peterzhu2118 committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    8b70841 View commit details
    Browse the repository at this point in the history