GNU bug report logs - #70939
[PATCH] Add commands to run unit tests in go-ts-mode

Previous Next

Package: emacs;

Reported by: Ankit Gadiya <ankit <at> argp.in>

Date: Tue, 14 May 2024 14:06:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ankit Gadiya <ankit <at> argp.in>
To: Randy Taylor <dev <at> rjt.dev>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70939 <at> debbugs.gnu.org
Subject: bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode
Date: Sun, 23 Jun 2024 20:16:23 +0530
[Message part 1 (text/plain, inline)]
> When running go-ts-mode-test-file, it seems to match things that aren't functions like interfaces. I think we should only be matching functions, and more specifically, shouldn't we only be matching functions starting with "Test"?
> We could perhaps extend the error checking to include that as well?

I've updated the patch to include a "function_declaration" and "Test" prefix
check. I also did a minor refactoring to avoid special handling in the case when
the region is not active. I'm also attaching the updated sample file with more
scenarios for testing.

>
> For the commit message, I'm not sure we need that paragraph especially when it's already described in the news. Eli what do you think?
>
> +*** New unit test commands.
> +Two new commands are now available to run unit tests.
> Three?
>
> I'm also wondering if we should include "current" in the go-ts-mode-test-file and go-ts-mode-test-package function names. Maybe someone would expect that they would get prompted to select a file or package to test? Maybe I'm overthinking that :). Eli what do you think?

I'll wait for Eli to reply before incorporating the changes :).

Additionally, I also noticed that the emacs-30 branch is cut. I wanted
to check if I
need to rebase my patch onto master or emacs-30 branch?

--
Ankit
[0001-Add-commands-to-run-unit-tests-in-go-ts-mode.patch (text/x-patch, attachment)]
[sample_test.go (text/x-go, attachment)]

This bug report was last modified 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.