diff options
author | MSP-Greg <MSP-Greg@users.noreply.github.com> | 2020-02-19 08:11:32 -0600 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-02-22 10:01:09 +0900 |
commit | da310356874ae30f793911223562ece2449a05e7 (patch) | |
tree | ee1e3247aaaa1860783d571233fc1ca2e54ce7ab /test/readline | |
parent | d7984d0f543f59a66657eea20993be1d14df71d5 (diff) |
test/readline - allow ENV control of test class creation
In ruby/ruby, the tests run on both readline & reline by creating four test classes:
```
TestReadline
TestReadlineHistory
TestRelineAsReadline
TestRelineAsReadlineHistory
```
Reline inports the test files and uses them in its CI. Adding the ENV control allows it to only run the `TestRelineAsReadline` classes.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2916
Diffstat (limited to 'test/readline')
-rw-r--r-- | test/readline/test_readline.rb | 4 | ||||
-rw-r--r-- | test/readline/test_readline_history.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 5e1f1385ee..0d0eb04dc6 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -784,7 +784,7 @@ class TestReadline < Test::Unit::TestCase use_ext_readline super end -end if defined?(ReadlineSo) +end if defined?(ReadlineSo) && ENV["TEST_READLINE_OR_RELINE"] != "Reline" class TestRelineAsReadline < Test::Unit::TestCase include BasetestReadline @@ -801,4 +801,4 @@ class TestRelineAsReadline < Test::Unit::TestCase super end end -end if defined?(Reline) +end if defined?(Reline) && ENV["TEST_READLINE_OR_RELINE"] != "Readline" diff --git a/test/readline/test_readline_history.rb b/test/readline/test_readline_history.rb index 98fef655e1..f4e93fa1b6 100644 --- a/test/readline/test_readline_history.rb +++ b/test/readline/test_readline_history.rb @@ -260,6 +260,7 @@ class TestReadlineHistory < Test::Unit::TestCase super end end if defined?(::ReadlineSo) && defined?(::ReadlineSo::HISTORY) && + ENV["TEST_READLINE_OR_RELINE"] != "Reline" && ( begin ReadlineSo::HISTORY.clear @@ -283,4 +284,4 @@ class TestRelineAsReadlineHistory < Test::Unit::TestCase super end end -end if defined?(Reline) +end if defined?(Reline) && ENV["TEST_READLINE_OR_RELINE"] != "Readline" |