summaryrefslogtreecommitdiff
path: root/test/readline/test_readline.rb
diff options
context:
space:
mode:
authorMSP-Greg <MSP-Greg@users.noreply.github.com>2020-02-19 08:11:32 -0600
committeraycabta <aycabta@gmail.com>2020-02-22 10:01:09 +0900
commitda310356874ae30f793911223562ece2449a05e7 (patch)
treeee1e3247aaaa1860783d571233fc1ca2e54ce7ab /test/readline/test_readline.rb
parentd7984d0f543f59a66657eea20993be1d14df71d5 (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/test_readline.rb')
-rw-r--r--test/readline/test_readline.rb4
1 files changed, 2 insertions, 2 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"