From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Perl and Emacs: Developing tests for progmodes Date: Thu, 22 Oct 2020 06:42:09 -0700 Message-ID: References: <935d77f8-72c4-16fd-f9d6-39ba965e99e8@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier , =?UTF-8?B?SGFyYWxkIErDtnJn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 22 15:42:57 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kVaro-0005hn-SF for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Oct 2020 15:42:56 +0200 Original-Received: from localhost ([::1]:35596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVarn-00038p-TU for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Oct 2020 09:42:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVar8-0002c3-UN for emacs-devel@gnu.org; Thu, 22 Oct 2020 09:42:14 -0400 Original-Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:38523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVar6-0005zf-UX for emacs-devel@gnu.org; Thu, 22 Oct 2020 09:42:14 -0400 Original-Received: by mail-ej1-x62a.google.com with SMTP id ce10so2372068ejc.5 for ; Thu, 22 Oct 2020 06:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=L1DFWcb92x1L/JHw5QZvXsmF1+rRYbntt83pB4inRzk=; b=pLgPGEVaAAfFA2FPxO/fPjXgxISIn2AordZVFtGcOV9DMVR6yJ/xTAlYr1oHoVGwrP icT1/EoC5F6jkF0SdVnUZ1pQWmMItxtD3oQRthv8wYo2h6hcXPg3mAKG9fqA6g0VrBys FISa/n/w60nnWLEUzVyT1h9X0Yblh0R3YilHY4NYx2meFypllYkhMG78JQxgtcMAqwep Ums+1plpJE8ajEgKx2iTsqSw10Q5BcGBRsXMTCSpDRYCr4oQd1TzTZnaZ0oRZZQQLG6Q s83epVRzb0L1YBPcVV4VgUM223lcpYH6dUnaV7sv8q6sItC33iFRHaKVOYGyQKq3JhvD +U4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=L1DFWcb92x1L/JHw5QZvXsmF1+rRYbntt83pB4inRzk=; b=UsjVV51ePej5DPlPm4g4K1jWx1EqdcWhwor3LG4ep7w/FCm6V786i+nc4rNH6z5h3K dI8AY9sO0V2fGLiUb2pf7sebSb0I8QKCj2m+d7JkTlvMMGLltFoF5R5U+j+NYSDNVgGk CxMzkJIM2aI3PNTuPBd+dwgkEBnM1Er88ovWtVsOqv+1A7R7WoGBVBPFtatFQ6y5c2hv yPyov0sBvwYK+pGygw3baKa2uYetDBl2+/F6L6STwCJ2mBUCJJV7H1BXKPPCALu5pxY3 T9aQfZrG7UcTjQIHAv8m44h8ckhYQj2z+JKoP70qehWtvuQt2Hj0KXEDneFuEVlOp6R7 T7BA== X-Gm-Message-State: AOAM530Sila9XSy6OmWfyU1bWhZ7gS4v/xVVGLC2a1g4bzXo8wzheNTk WpNi5Id9sth6vnv/LABoRbSVeJGXmAoNmhS5wSA= X-Google-Smtp-Source: ABdhPJwToXMRA5TlGDr75Zy/A7c016ncTH9MW4+UEB+4e+VOBDNtV/o30NsAlQjp0ISMgfu6426si3yDyT24fCo3xEQ= X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr2371784ejj.477.1603374130056; Thu, 22 Oct 2020 06:42:10 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 22 Oct 2020 06:42:09 -0700 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=stefankangas@gmail.com; helo=mail-ej1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258287 Archived-At: Stefan Kangas writes: > Stefan Monnier writes: > >> I think for now we can tag the tests individually with >> >> (ert-deftest (...) >> (skip-unless (eq cperl-test-mode #'cperl-mode)) >> ...) > > How about something like the attached to make the tests run > automatically also for perl-mode? It's a bit of a hack, admittedly. This never got a reply. Is the idea reasonable, or should it just be scrapped? I personally don't have a strong opinion, but I didn't want to throw it away without at least asking first. (It is sometimes hard for me to understand if no reply means "sure, go ahead" or "this is too dumb to even comment on"... ;-) Of course, it will introduce some potential friction in developing new cperl-mode tests, but on the other hand perl-mode.el will see some automated testing. > diff --git a/test/lisp/progmodes/perl-mode-tests.el b/test/lisp/progmodes/perl-mode-tests.el > new file mode 100644 > index 0000000000..a2ea972c10 > --- /dev/null > +++ b/test/lisp/progmodes/perl-mode-tests.el > @@ -0,0 +1,33 @@ [...] > +(require 'perl-mode) > + > +;;;; Re-use cperl-mode tests > + > +(defvar cperl-test-mode) > +(setq cperl-test-mode #'perl-mode) > +(load-file (expand-file-name "cperl-mode-tests.el" > + (file-truename > + (file-name-directory (or load-file-name > + buffer-file-name))))) > + > +;;; perl-mode-tests.el ends here