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.
This commit is contained in:
parent
d7984d0f54
commit
da31035687
Notes:
git
2020-02-22 10:01:32 +09:00
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user