Function: go-test--get-current-test-info

go-test--get-current-test-info is a natively compiled function defined in gotest.el.

Signature

(go-test--get-current-test-info)

Documentation

Return the current test and suite name.

Source Code

;; Defined in /nix/store/y8iliarhkh17m4iiwcy1hbi78r7b5489-emacs-packages-deps/share/emacs/site-lisp/elpa/gotest-20230221.945/gotest.el
(defun go-test--get-current-test-info ()
  "Return the current test and suite name."
  (save-excursion
    (end-of-line)
    (if (search-backward-regexp
         (format "%s\\(Test\\|Example\\)%s" go-test-regexp-prefix go-test-regexp-suffix)
         nil t)
        (let ((suite-match (match-string-no-properties 1))
              (test-match (match-string-no-properties 2)))
          (list
           (go-test--get-suite-name-from-match-string suite-match) test-match))
      (error "Unable to find a test"))))