summaryrefslogtreecommitdiff
path: root/test/prism/index_write_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/index_write_test.rb')
-rw-r--r--test/prism/index_write_test.rb89
1 files changed, 0 insertions, 89 deletions
diff --git a/test/prism/index_write_test.rb b/test/prism/index_write_test.rb
deleted file mode 100644
index 1c6f7bce89..0000000000
--- a/test/prism/index_write_test.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class IndexWriteTest < TestCase
- def test_keywords_3_3_0
- assert_parse_success(<<~RUBY, "3.3.0")
- foo[bar: 1] = 1
- foo[bar: 1] &&= 1
- foo[bar: 1] ||= 1
- foo[bar: 1] += 1
- RUBY
-
- assert_parse_success(<<~RUBY, "3.3.0")
- def foo(**)
- bar[**] = 1
- bar[**] &&= 1
- bar[**] ||= 1
- bar[**] += 1
- end
- RUBY
- end
-
- def test_block_3_3_0
- assert_parse_success(<<~RUBY, "3.3.0")
- foo[&bar] = 1
- foo[&bar] &&= 1
- foo[&bar] ||= 1
- foo[&bar] += 1
- RUBY
-
- assert_parse_success(<<~RUBY, "3.3.0")
- def foo(&)
- bar[&] = 1
- bar[&] &&= 1
- bar[&] ||= 1
- bar[&] += 1
- end
- RUBY
- end
-
- # def test_keywords_latest
- # assert_parse_failure(<<~RUBY)
- # foo[bar: 1] = 1
- # foo[bar: 1] &&= 1
- # foo[bar: 1] ||= 1
- # foo[bar: 1] += 1
- # RUBY
-
- # assert_parse_failure(<<~RUBY)
- # def foo(**)
- # bar[**] = 1
- # bar[**] &&= 1
- # bar[**] ||= 1
- # bar[**] += 1
- # end
- # RUBY
- # end
-
- # def test_block_latest
- # assert_parse_failure(<<~RUBY)
- # foo[&bar] = 1
- # foo[&bar] &&= 1
- # foo[&bar] ||= 1
- # foo[&bar] += 1
- # RUBY
-
- # assert_parse_failure(<<~RUBY)
- # def foo(&)
- # bar[&] = 1
- # bar[&] &&= 1
- # bar[&] ||= 1
- # bar[&] += 1
- # end
- # RUBY
- # end
-
- private
-
- def assert_parse_success(source, version = "latest")
- assert Prism.parse_success?(source, version: version)
- end
-
- def assert_parse_failure(source, version = "latest")
- assert Prism.parse_failure?(source, version: version)
- end
- end
-end