diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-11-15 10:34:22 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-11-15 11:02:16 +0900 |
| commit | da2c2931a602da22bc1fd10dc41f5c3a117bf502 (patch) | |
| tree | 81c2ac564e37349dfbc0a4e5c246c262a0ae3de8 /test | |
| parent | 197ab823bad0bce93bfd9248dcfac9e548d9e806 (diff) | |
Skip Type completion tests related with IRB::VERSION
Diffstat (limited to 'test')
| -rw-r--r-- | test/irb/type_completion/test_type_analyze.rb | 6 | ||||
| -rw-r--r-- | test/irb/type_completion/test_type_completor.rb | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/irb/type_completion/test_type_analyze.rb b/test/irb/type_completion/test_type_analyze.rb index c417a8ad12..e3547bf250 100644 --- a/test/irb/type_completion/test_type_analyze.rb +++ b/test/irb/type_completion/test_type_analyze.rb @@ -445,8 +445,10 @@ module TestIRB assert_call('class A; X=1; class B; X=""; X.', include: String, exclude: Integer) assert_call('class A; X=1; class B; X=""; end; X.', include: Integer, exclude: String) assert_call('class A; class B; X=1; end; end; class A; class B; X.', include: Integer) - assert_call('module IRB; VERSION.', include: String) - assert_call('module IRB; IRB::VERSION.', include: String) + if defined?(IRB::VERSION) + assert_call('module IRB; VERSION.', include: String) + assert_call('module IRB; IRB::VERSION.', include: String) + end assert_call('module IRB; VERSION=1; VERSION.', include: Integer) assert_call('module IRB; VERSION=1; IRB::VERSION.', include: Integer) assert_call('module IRB; module A; VERSION.', include: String) diff --git a/test/irb/type_completion/test_type_completor.rb b/test/irb/type_completion/test_type_completor.rb index eed400b3e2..90477f8f91 100644 --- a/test/irb/type_completion/test_type_completor.rb +++ b/test/irb/type_completion/test_type_completor.rb @@ -89,7 +89,7 @@ module TestIRB def test_const assert_completion('Ar', include: 'Array') assert_completion('::Ar', include: 'Array') - assert_completion('IRB::V', include: 'VERSION') + assert_completion('IRB::V', include: 'VERSION') if defined?(IRB::VERSION) assert_completion('FooBar=1; F', include: 'FooBar') assert_completion('::FooBar=1; ::F', include: 'FooBar') assert_doc_namespace('Array', 'Array') |
