Subject: bug#66183: elixir-ts-mode test failure

From: john muhl <[email-masked]>
Date: Sun, 24 Sep 2023 11:53:19 -0500

The change in 5cba5ee8905 caused an elixir test to start failing. The
white space at the start of the test is now in a heex range so pressing
tab there matches a heex rule instead of the elixir one. Moving the
dummy range to the end fixes the test.

--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -722,7 +722,7 @@ treesit-update-ranges
                           ;; language, set it's range to a dummy (1
                           ;; . 1), otherwise it would be set to the
                           ;; whole buffer, which is not what we want.
-                          `((,(point-min) . ,(point-min))))))))))))
+                          `((,(point-max) . ,(point-max))))))))))))

Running 1 tests (2023-09-24 11:52:17-0500, selector ‘t’)
Test elixir-ts-mode-test-indentation backtrace:
  signal(ert-test-failed (("Mismatch in test \"Basic modules\", file /
  ert-fail(("Mismatch in test \"Basic modules\", file /home/jm/src/ema
  ert-test--erts-test(((dummy . t) (code)) "/home/jm/src/emacs/test/li
  ert-test-erts-file("/home/jm/src/emacs/test/lisp/progmodes/elixir-ts
  (closure (t) nil (let ((value-4 (gensym "ert-form-evaluation-aborted
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name elixir-ts-mode-test-indentation :docu
  ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test 
  ert-run-tests(t #f(compiled-function (event-type &rest event-args) #
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "/home/jm/src/emacs/lisp/progmodes/e
  command-line()
  normal-top-level()
Test elixir-ts-mode-test-indentation condition:
    (ert-test-failed
     ("Mismatch in test \"Basic modules\", file /home/jm/src/emacs/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts"
      #(
	"  defmodule Foobar do\n    def bar() do\n      \"one\"\n    end\n  end\n"
	0 65 (fontified nil))
      "defmodule Foobar do\n  def bar() do\n    \"one\"\n  end\nend\n"))
   FAILED  1/1  elixir-ts-mode-test-indentation (0.053512 sec) at ../../src/emacs/test/lisp/progmodes/elixir-ts-mode-tests.el:26

Ran 1 tests, 0 results as expected, 1 unexpected (2023-09-24 11:52:17-0500, 0.118489 sec)

1 unexpected results:
   FAILED  elixir-ts-mode-test-indentation