From 4b0782da6f47f5e4028830e63ee0a4e66e18e58b Mon Sep 17 00:00:00 2001 From: tompng Date: Sat, 8 Jun 2024 22:28:16 +0900 Subject: [PATCH] foobar --- .github/workflows/test.yml | 90 ++------------------------------------ test/irb/test_irb.rb | 19 +++++++- 2 files changed, 21 insertions(+), 88 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 810c27590..79e5cad87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,104 +7,20 @@ on: - cron: "30 14 * * *" jobs: - ruby-versions: - uses: ruby/actions/.github/workflows/ruby_versions.yml@master - with: - engine: cruby-truffleruby - min_version: 2.7 - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.3" - bundler-cache: true - - name: Run rubocop - run: bundle exec rubocop irb: - needs: ruby-versions - name: rake test ${{ matrix.ruby }} ${{ matrix.with_latest_reline && '(latest reline)' || '' }} - strategy: - matrix: - ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} - with_latest_reline: [true, false] - exclude: - - ruby: truffleruby - fail-fast: false + name: rake test head runs-on: ubuntu-latest env: - WITH_LATEST_RELINE: ${{matrix.with_latest_reline}} + WITH_LATEST_RELINE: false timeout-minutes: 30 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: head bundler-cache: true - name: Run tests run: bundle exec rake test - name: Run tests in isolation run: bundle exec rake test_in_isolation - debug-test: - name: Debug compatibility test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3 - - name: Install dependencies - run: bundle install - - name: Install IRB - run: | - rake install - - name: Download ruby/debug - run: | - git clone https://github.com/ruby/debug - - name: Run debug tests - working-directory: ./debug - run: | - bundle install - bundle exec rake - vterm-yamatanooroti: - needs: ruby-versions - name: >- - vterm-yamatanooroti ${{ matrix.ruby }} ${{ matrix.with_latest_reline && '(latest reline)' || '' }} - runs-on: ubuntu-latest - strategy: - matrix: - ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} - with_latest_reline: [true, false] - exclude: - - ruby: truffleruby - - ruby: truffleruby-head - fail-fast: false - env: - WITH_LATEST_RELINE: ${{matrix.with_latest_reline}} - timeout-minutes: 30 - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Install libvterm - run: | - sudo apt install -y libtool-bin - wget http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.4.tar.gz - tar xvzf libvterm-0.1.4.tar.gz - cd libvterm-0.1.4 - sed -i -e 's/^PREFIX=.*$/PREFIX=\/usr/g' Makefile - make - sudo make install - - name: Install dependencies - run: | - WITH_VTERM=1 bundle install - - name: rake test_yamatanooroti - run: WITH_VTERM=1 bundle exec rake test_yamatanooroti diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb index 28be74408..e658c5c2b 100644 --- a/test/irb/test_irb.rb +++ b/test/irb/test_irb.rb @@ -4,6 +4,7 @@ require_relative "helper" module TestIRB +=begin class InputTest < IntegrationTestCase def test_symbol_aliases_are_handled_correctly write_ruby <<~'RUBY' @@ -823,8 +824,24 @@ def build_irb IRB::Irb.new(workspace, TestInputMethod.new) end end - +=end class BacktraceFilteringTest < TestIRB::IntegrationTestCase + def test_foobar + write_ruby <<~'RUBY' + p source_location: Kernel.method(:require).source_location + p EnvUtil.rubybin + p ARGV + p ENV + gets + RUBY + + output = run_ruby_file do + type "bar" + end + + assert_match(/should-not-match/, output) + end + def test_backtrace_filtering write_ruby <<~'RUBY' def foo