From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode Date: Wed, 10 Jul 2024 23:43:37 +0000 Message-ID: References: <3YG1jNZQXdsT7DtRW9TTuDWpXHZ6qNpBW-7sfn36Mo7fzUp9dEKcHxCBEjpFVeJUbqP8YB9WXd8KyR9LuUERxjVUlLfw8MiE6DGcngF9lG4=@rjt.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1630"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70939@debbugs.gnu.org To: Ankit Gadiya Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 11 01:44:26 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sRgz4-0000Fk-Bj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jul 2024 01:44:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRgyj-0007mp-3U; Wed, 10 Jul 2024 19:44:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRgyg-0007md-RP for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 19:44:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRgyg-0008Mq-JR for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 19:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRgyf-0005qQ-N7 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 19:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2024 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70939-submit@debbugs.gnu.org id=B70939.172065503322446 (code B ref 70939); Wed, 10 Jul 2024 23:44:01 +0000 Original-Received: (at 70939) by debbugs.gnu.org; 10 Jul 2024 23:43:53 +0000 Original-Received: from localhost ([127.0.0.1]:50547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRgyX-0005py-0K for submit@debbugs.gnu.org; Wed, 10 Jul 2024 19:43:53 -0400 Original-Received: from mail-4323.proton.ch ([185.70.43.23]:26991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRgyR-0005pf-EG for 70939@debbugs.gnu.org; Wed, 10 Jul 2024 19:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1720655022; x=1720914222; bh=dAQa2FkJmW2KV0khu/UviH/ogNvwTK+jbcyxmKUiHIQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vCV/qrU3rLrXBoiagP8Xm9xqm160ATp3tDnVEYD5KuxCOpDS9n9gN0EHZ8Rc2yBqB KLwnA20uuKgB5XCdSmDe+b4XhulGnuAov3/UpY0BMSbb97YXrFr3e5VTnu550GpyBi vziY4TdUSEIBQuyeotZV4QE127fWmRxTdUQuZK+O2jhHUeRkhNbVBz6BsNgnkikV8x 7IWy7OgqNBNu0xVcs/BsIZcqLtNH9Tm2y5c6GZ26u9iIZMwM6kd32eOt0bbCFIyvar qOPSpYNhWpCupT5IF8pRS/48fcnWH4Cyx9eTpUAf0Zj4zShZEmlm81Z6AT9dszbSQz 3W3rbnf/DPvjw== In-Reply-To: Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 408e9205bfa8daf40c75b8411cfd0766fb0f1c13 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288702 Archived-At: On Saturday, July 6th, 2024 at 15:44, Ankit Gadiya wrote: >=20 > Apologies for the delay again. >=20 > > > > For the commit message, I'm not sure we need that paragraph especia= lly when it's already described in the news. Eli what do you think? >=20 >=20 > Thanks Randy and Eli, I've updated the commit message to be shorter now. >=20 > > > > +*** New unit test commands. > > > > +Two new commands are now available to run unit tests. > > > > Three? > >=20 > > This still needs to be updated. >=20 >=20 > Thanks, I fixed it. >=20 > > A few more comments: > > +(defun go-ts-mode--get-test-regexp-at-point () > > + "Return a regular expression for tests at point. > > ^ the > >=20 > > Could go-ts-mode--get-test-regexp-at-point and go-ts-mode-test-file use= if-let? >=20 >=20 > I wasn't familiar with if-let, thanks for this. Incorporated it in > both the functions. >=20 > > Also, the indentation looks off in go-ts-mode-test-function-at-point (2= extra spaces methinks). >=20 >=20 > Fixed this, thanks. >=20 > > > > 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? Ma= ybe I'm overthinking that :). Eli what do you think? > > >=20 > > > I'll wait for Eli to reply before incorporating the changes :). > >=20 > > And he chimed in - let's go with his suggestions. >=20 >=20 > Updated both the function names. > go-ts-mode-test-this-file > go-ts-mode-test-this-package >=20 > > > Additionally, I also noticed that the emacs-30 branch is cut. I wante= d > > > to check if I > > > need to rebase my patch onto master or emacs-30 branch? > >=20 > > I would guess master, but let's see what Eli says. >=20 >=20 > I rebased my patch on the master now. Requesting a re-review. >=20 > Thanks >=20 > -- > Ankit I only have a few comments about the commit message: Three new commands are added in the go-ts-mode to run unit tests. I would just drop this line altogether, personally. (go-ts-mode-map): New map variable. This should probably read something like Add new bindings. (go-ts-mode-test-file): New function. (go-ts-mode-test-package): New function. These two need to be updated (...-test-this-...). Everything else looks good to me. Thanks for working on this, Ankit. Eli, if you have no further comments please install when you get a chance. = Thanks in advance.