diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-01-22 10:37:45 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-01-22 16:13:36 +0000 |
| commit | e00f42e5d345ca742dec6f27b851b753ce45ca85 (patch) | |
| tree | 6ebc56efa0bf35e5da557af8d140ca070e8091c2 /test | |
| parent | d68aaa66726b8fe929709521844e46dc20d61d08 (diff) | |
[ruby/prism] Return 1-indexed line numbers
https://github.com/ruby/prism/commit/ad17f58729
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/format_errors_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/prism/format_errors_test.rb b/test/prism/format_errors_test.rb new file mode 100644 index 0000000000..62b24723b8 --- /dev/null +++ b/test/prism/format_errors_test.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +return if Prism::BACKEND == :FFI + +require_relative "test_helper" + +module Prism + class FormatErrorsTest < TestCase + def test_format_errors + assert_equal <<~ERROR, Debug.format_errors("<>", false) + > 1 | <> + | ^ cannot parse the expression + | ^ cannot parse the expression + ERROR + end + end +end |
