From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17733 invoked from network); 11 Jul 2021 15:33:57 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 11 Jul 2021 15:33:57 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1m2bSt-001nnj-G1 for ml@inbox.vuxu.org; Sun, 11 Jul 2021 10:33:55 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1m2bSs-008Fkw-TJ for ml@inbox.vuxu.org; Sun, 11 Jul 2021 10:33:54 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1m2bSq-008Fkn-Rl for ding@lists.math.uh.edu; Sun, 11 Jul 2021 10:33:52 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1m2bSo-00HF0U-RI for ding@lists.math.uh.edu; Sun, 11 Jul 2021 10:33:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OFZWlUr/UyXe3tiP446GRfgvKpnTB02Iqo/AmxXpr10=; b=BoXePUBnVmlgNImYJUFqSOQCN2 v8Y7v+7sgUKsoBnKlR2c4aSHaCASwfBza7rNlfLQLWywTgLAVL8negIvi3bUZCbRzfE8/yax67wPI VVAfPfA83SFaN3TQqiONTWLGLFuP1J13APurMonB6W5KBMiQhzIHRcXidZ6f+3OM5hfw=; Received: from mail.ericabrahamsen.net ([52.70.2.18]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2bSh-0004Mr-1I for ding@gnus.org; Sun, 11 Jul 2021 17:33:45 +0200 Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 2430DFA095; Sun, 11 Jul 2021 15:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1626017615; bh=OFZWlUr/UyXe3tiP446GRfgvKpnTB02Iqo/AmxXpr10=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YMx3gQmCW46cMaPvsdhIFiCc+1wt+YGOurKsNjz84d9hSgcmGj/dBBSjwTO9Xem9o YXHUfQrswfojeqfyUwG2BwGPUmMfPL661FcaH9fmBaxG98suRqipOjlhcJ3/bX0PPk ov1OHW3YQFxzMtaTanPSALEYA3c7HZjL7905V3BI= From: Eric Abrahamsen To: Adam =?utf-8?Q?Sj=C3=B8gren?= Cc: ding@gnus.org Subject: Re: is it possible to search by list-id? References: <875yxllhkr.fsf@gnus.jao.io> <87a6mxlzen.fsf@ucl.ac.uk> <87sg0oj38s.fsf@gnus.jao.io> <87eec8it4j.fsf@gnus.jao.io> <8735sn3qw5.fsf@gnus.jao.io> <874kd11qnr.fsf@ericabrahamsen.net> <87h7h1tjm2.fsf@tullinup.koldfront.dk> Date: Sun, 11 Jul 2021 08:33:33 -0700 In-Reply-To: <87h7h1tjm2.fsf@tullinup.koldfront.dk> ("Adam =?utf-8?Q?Sj?= =?utf-8?Q?=C3=B8gren=22's?= message of "Sun, 11 Jul 2021 09:06:29 +0200") Message-ID: <87r1g4zwz6.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Adam Sj=C3=B8gren writes: > Eric writes: > >> I've patched this now, and added new tests to prevent regression. > =E2=86=91 > This is great! Are tests easy to write for Gnus? They most certainly aren't! Almost all the crucial code that you'd want to test requires a full working Gnus installation, with a .newsrc.eld and local data. There's very little code isolation between the various bits, and any subsystem you try to test ends up calling all the other subsystems. gnus-search is meant to be more modular, but even here you can really only test query parsing, and the transformation of parsed queries into search-engine-specific strings. If you want to test the parsing of search results, you again need a working installation, and external programs. I wrote a separate package called gnus-mock to address this: it sets up a temporary working Gnus installation, and starts a new Emacs process that you can use to play with Gnus code and wreck the data, and then delete it all and start afresh. That's what I use for most Gnus hacking. I also started writing an interactive test suite for this package, so you could start it up and run the tests, and it would simulate user behavior, but my courage failed me before I got very far. Maybe someday when I'm in bed for a week recovering from a broken leg or pneumonia I'll finish it. Eric