* bug#68612: typescript-ts-mode-test-indentation test fails if tsx grammar not installed
@ 2024-01-20 10:35 Matthew Smith
2024-01-21 5:12 ` Yuan Fu
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Smith @ 2024-01-20 10:35 UTC (permalink / raw)
To: 68612
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
Severity: minor
Tags: patch
Hi,
typescript-ts-mode-test-indentation only checks if the typescript
language grammar is installed before running the test, but the test
also depends on the tsx language grammar.
A patch is attached that skips the test unless both typescript and tsx
grammars are installed.
Thanks,
Matthew
[-- Attachment #2: typescript-ts-mode-test.patch --]
[-- Type: text/x-patch, Size: 1291 bytes --]
From 6a38a3f3d369c79bbeec6b80ad43cbf4cbbff81d Mon Sep 17 00:00:00 2001
From: Matthew Smith <matthew@gentoo.org>
Date: Sat, 20 Jan 2024 09:45:31 +0000
Subject: [PATCH] typescript-ts-mode: Skip test if tsx grammar missing
typescript-ts-mode-test-indentation depends on both the tree-sitter
typescript grammar, and the tree-sitter tsx grammar. If only the
typescript is installed, the tests will run and then fail unexpectedly
after tsx fails to load.
* test/lisp/progmodes/typescript-ts-mode-tests.el
(typescript-ts-mode-test-indentation): Skip test if tsx grammar is missing.
---
test/lisp/progmodes/typescript-ts-mode-tests.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/lisp/progmodes/typescript-ts-mode-tests.el b/test/lisp/progmodes/typescript-ts-mode-tests.el
index 27b7df714e6..effd9551fb0 100644
--- a/test/lisp/progmodes/typescript-ts-mode-tests.el
+++ b/test/lisp/progmodes/typescript-ts-mode-tests.el
@@ -24,7 +24,8 @@
(require 'treesit)
(ert-deftest typescript-ts-mode-test-indentation ()
- (skip-unless (treesit-ready-p 'typescript))
+ (skip-unless (and (treesit-ready-p 'typescript)
+ (treesit-ready-p 'tsx)))
(ert-test-erts-file (ert-resource-file "indent.erts")))
(provide 'typescript-ts-mode-tests)
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#68612: typescript-ts-mode-test-indentation test fails if tsx grammar not installed
2024-01-20 10:35 bug#68612: typescript-ts-mode-test-indentation test fails if tsx grammar not installed Matthew Smith
@ 2024-01-21 5:12 ` Yuan Fu
0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2024-01-21 5:12 UTC (permalink / raw)
To: Matthew Smith; +Cc: 68612-done
> On Jan 20, 2024, at 2:35 AM, Matthew Smith <matthew@gentoo.org> wrote:
>
> Severity: minor
> Tags: patch
>
> Hi,
>
> typescript-ts-mode-test-indentation only checks if the typescript
> language grammar is installed before running the test, but the test
> also depends on the tsx language grammar.
>
> A patch is attached that skips the test unless both typescript and tsx
> grammars are installed.
>
Thank you Matthew! Pushed to emacs-29.
Yuan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-21 5:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 10:35 bug#68612: typescript-ts-mode-test-indentation test fails if tsx grammar not installed Matthew Smith
2024-01-21 5:12 ` Yuan Fu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.