Commit 81fbc3262e9b

Vincent Demeester <vincent@sbr.pm>
2024-12-11 09:22:15
tools/emacs: update gotest-ts.el again
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 0151b81
Changed files (1)
tools
emacs
tools/emacs/lisp/gotest-ts.el
@@ -3,7 +3,7 @@
 ;; Author: Chmouel Boudjnah
 ;; Maintainer: Chmouel Boudjnah
 ;; Version: 0.2
-;; Package-Requires: ((emacs "29.1") (gotest "20230221.945"))
+;; Package-Requires: ((emacs "29.1") (gotest "0.16.0"))
 ;; Homepage: https://github.com/chmouel/gotest-ts.el
 ;; Keywords: languages, go, tests
 
@@ -26,12 +26,17 @@
 
 ;;; Commentary:
 
-;; commentary
 ;; This mode provides Emacs functionality for running tests using GoTest
 ;; and Treesitter.
 ;;
 ;; It supports running test functions and subtests in .go files with Treesitter
 ;; support.
+;;
+;; Bug:
+;; When you have different structure inside a subtest that has a Name: it would
+;; pick up the wrong one.You just need to place yourself in the right struct
+;; where the name is.
+;;
 ;;; Code:
 
 ;;; gotest-ts.el ends here
@@ -40,11 +45,10 @@
 
 (defcustom gotest-ts-get-subtest-key "name"
   "The key used to identify a subtest in a struct.
-Default is 'name'."
+Default is \"name\"."
   :type 'string
   :group 'gotest-ts)
 
-
 (defun gotest-ts-get-subtest-ts ()
   "Get the test function or subtest at point."
   (let* ((struct-node (treesit-parent-until
@@ -75,8 +79,3 @@ Default is 'name'."
       (go-test--go-test (concat "-run " gotest " .")))))
 
 (provide 'gotest-ts)
-(string-match "_test\\.go" (buffer-file-name))
-    (let ((gotest (gotest-ts-get-subtest-ts )))
-      (go-test--go-test (concat "-run " gotest " .")))))
-
-(provide 'gotest-ts)