From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan.J.Smith@outlook.com Newsgroups: gmane.emacs.bugs Subject: bug#51450: Bugs in gnus-short-group-name Date: Wed, 27 Oct 2021 17:59:04 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29229"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Morgan Smith To: 51450@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 28 00:06:26 2021 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 1mfr3x-0007O9-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Oct 2021 00:06:26 +0200 Original-Received: from localhost ([::1]:50682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfr3v-0001h6-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Oct 2021 18:06:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfr3a-0001ee-At for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 18:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfr3a-0006V8-0E for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 18:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfr3Z-00028r-Rp for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 18:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Morgan.J.Smith@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Oct 2021 22:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51450 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16353723278166 (code B ref -1); Wed, 27 Oct 2021 22:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2021 22:05:27 +0000 Original-Received: from localhost ([127.0.0.1]:50749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfr31-00027e-A2 for submit@debbugs.gnu.org; Wed, 27 Oct 2021 18:05:27 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfr2w-00027R-Lj for submit@debbugs.gnu.org; Wed, 27 Oct 2021 18:05:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfr2w-0001Q2-8o for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 18:05:22 -0400 Original-Received: from mail-bn7nam10olkn20815.outbound.protection.outlook.com ([2a01:111:f400:7e8a::815]:61792 helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfr2r-0006LT-Ak for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 18:05:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HxFxWIFFEQcpUqTtti5v3kOB4uTdOA+wPSKjxnQBGHf5DSnre4LrhoVpEFYMrze9DAa1W+Hof5nBQFxJTS0Meeh+LM0/Whw2ji8uA+IvtJjFDzA78w7vJ4Vf65u2ACwD+Jrc/f2HNVQF9tPPkNlTaHO/8UeqQMQv/BFnrOisqzOlogA4iUokZCLhhInVpYdo5qiM8hSR7lLLS4XOgpI4X8xN9k4a2BLs91y38h5zdvo1rlmjWHR+QqeH/ibHdCLiM/yeOg1DbXY0IaCEL97mPRyOtfQS/aMGqpuEQRBX5rpwmzzB3KavdhKo7JAfP2EtFy86doNb2xIv+SvQezm1ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JBIpAtGIUgQWjVvQzUsiGDcht8SMmdKgmLY37eC88oI=; b=DmxCcb5PJUWrR2vMhlXH1sjDs5x8fv4scybCzveKNN6/i7De9l7sdbBgjwEru8TUkMotosVi+spX1zawYrIZ0fg+SXdy5FBuenA59cthx4jQO5VhaJmM0ha/L5ZlMCPb6uageKhtq8XMqRhX0plRBF2abBNnH0RlkZyHB2azzb/u6YXYxz+3h1VdV16cxBe0IuTmjqEL1wuvGv5twy9PW7hLtKUXc0apFJpt16mlZYUWgVirh/nhBsMA1z8ywphKFFvx6t1EdbufM2h02hTXvm8/xNNuh2uvDIc7fisH1V63tZqe1tvGOJ++WvqG1fCRBedejjiR7qjtZIeugaC/+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JBIpAtGIUgQWjVvQzUsiGDcht8SMmdKgmLY37eC88oI=; b=K9GgpIVKC1HyxR0t73KPWrkEENaafrL1MgDvllzGIgniF4w6j167FnlrB+ZQvxFUnwkDMdqCY4Fy8ONu3aJ98NRBZIgmjSsF8aIdHqF9QQGoJDkBdAP5kvo4w+3V93NYdsUR3u8e/EpK2woeJz/aA7OMM/Pl/ai1yUoXvbb3VrLcKuFae+PPtT9NgX/QGenfmDKtETAm48FPbLAPiGFrd5dVF4Y7iO95G52ZWZSsAFwB9KZpKcI8SI8JWBpzF5XUqC31EdJgeRlTAfUvAPYOBgWslCgoZKBeYmBSnmbOCjPe6gOtT7ck+S5Xp4V87rHJ4AFB4r4UjvvNQUjt6+T+2w== Original-Received: from BYAPR05MB4023.namprd05.prod.outlook.com (2603:10b6:a02:87::30) by SJ0PR05MB7659.namprd05.prod.outlook.com (2603:10b6:a03:2cb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.11; Wed, 27 Oct 2021 22:00:14 +0000 Original-Received: from BYAPR05MB4023.namprd05.prod.outlook.com ([fe80::745d:ce8d:67ec:5154]) by BYAPR05MB4023.namprd05.prod.outlook.com ([fe80::745d:ce8d:67ec:5154%6]) with mapi id 15.20.4649.014; Wed, 27 Oct 2021 22:00:14 +0000 X-Mailer: git-send-email 2.33.1 X-TMN: [7b42lIgLav9wJL9KOSqnwyMS52tH4Sto] X-ClientProxiedBy: YQBPR01CA0012.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01::20) To BYAPR05MB4023.namprd05.prod.outlook.com (2603:10b6:a02:87::30) X-Microsoft-Original-Message-ID: <20211027215903.13200-1-Morgan.J.Smith@outlook.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from localhost.localdomain (170.52.80.188) by YQBPR01CA0012.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Wed, 27 Oct 2021 22:00:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1b0ff97d-c5b4-4935-bcdf-08d99995275b X-MS-Exchange-SLBlob-MailProps: NS9Gj58uCj0MP2qKj56MfqtQtU/vv7UwcD0Pe3+KDuwEa4gu9/1Xutk8Obct8vH/yvFsS+K9qU3vqY3zH1K3e33Jr13C5tVzwmiZz/2N/dPtuB5F1STj8EMxFhWpAFY3divh6TqbJI6F5Zo8VPLUonY2llsbY7n+jdtTlzbO5CralEA7TxlQ1Ru/AuYyy6HeTeRDP2LuCVVzpZUninT7dh5YZdpYaQBhX9XBG+nLqIRBgK9FcV74r4KUNLLTY2U378hX9GQAiBNMDsIVZ1pdazjdb7gAKCgMv/OBWuBAdX4JSG+4ceDpkrPoaNbPuqrYbVdxVGDSsiazFS/0EjxQN+PPBJXQ8jlwE/imzggSwqMW1TUiS+jKib3oz1kTR5jzQXP13jBcvVaQ+XRaQ+Hxd0vKgNA3eH40CQud23t131jTxNTqVF6fQKPzmcBHy+JMBtxkgJU4A6uA9u3mq3C3Wv/rP0SlMJ6ZutuClw5eVaqtNzmpi0qXidDBzyVgOBYXAopNJE2yz6gT9Dg7RcT/f0gcUYYYUoFnZrEswTGW9YdfoPpumgcu8VzLJfPMgYTgQMuXT8mdHfAne5rBSxqZpfQyw5tx8i4w2A4/vV9XqtiynIBAqhGgogvNd7mDtJiT/i79OS+2VvmQRUmMOrcpBbsiLdebgNncq6vBz8scTOtbsn4ImkyjPDGu4LrcnMXjPqFFtAmI418o+FswGduNiA== X-MS-TrafficTypeDiagnostic: SJ0PR05MB7659: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xT0RdgdEqm8mhSzoWGrQhk+KuOvC4WgJ2RqofbpyfoG7ntiwvemtHgl0xioAjYFH/5F7sqM06kMU+Xp4Usj7arKFpT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kUNfSZUtHpTNJrXu7AnO8LpkpdOpiKgZB2gHypJW3HThjDZgRtAHpw3rp9+LBEwwFOGJSas6GwQ+Ykum+QzMJN+oernwyrd/npboj1dSOW2vAQpgYoBqWebbWMD2wsZRu/1Ku19lpiWTilrwBcqNuTZVvzYgcYnyL5cSZkj2KJRg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b0ff97d-c5b4-4935-bcdf-08d99995275b X-MS-Exchange-CrossTenant-AuthSource: BYAPR05MB4023.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2021 22:00:14.3763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR05MB7659 Received-SPF: pass client-ip=2a01:111:f400:7e8a::815; envelope-from=Morgan.J.Smith@outlook.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:218476 Archived-At: From: Morgan Smith --- test/lisp/gnus/gnus-tests.el | 39 ++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/test/lisp/gnus/gnus-tests.el b/test/lisp/gnus/gnus-tests.el index 6602e67a34..f96b584064 100644 --- a/test/lisp/gnus/gnus-tests.el +++ b/test/lisp/gnus/gnus-tests.el @@ -1,4 +1,4 @@ -;;; gnus-tests.el --- Wrapper for the Gnus tests -*- lexical-binding:t -*- +;;; gnus-tests.el --- Gnus tests -*- lexical-binding:t -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. @@ -21,13 +21,36 @@ ;;; Commentary: -;; This file should contain nothing but requires for all the Gnus -;; tests that are not standalone. - ;;; Code: -;; registry.el is required by gnus-registry.el but this way we're explicit. -(require 'registry) -(require 'gnus-registry) +(require 'gnus) + +;; TODO: test with optional LEVELS argument +(ert-deftest gnus-short-group-name () + (map-apply + (lambda (input expected) + (should (string-equal (gnus-short-group-name input) expected))) + '( + ;; I think these are correct and nice and good + ("nnimap+email@example.com:archives/2020/03" . "email@example:a/2/03") + ("nndiary+diary:birthdays" . "diary:birthdays") + ("nnimap+email@example.com:test" . "email@example:test") + ("nnimap+email@example.com:234" . "email@example:234") + + ;; This is a very aggressive shortening of the left hand side. I + ;; don't like this + ("nnimap+email@banana.salesman.example.com:234" . "email@banana:234") + ("nntp+some.where.edu:soc.motss" . "some:s.motss") + ("nntp+news.gmane.org:gmane.emacs.gnus.general" . "news:g.e.g.general") + ("nntp+news.gnus.org:gmane.text.docbook.apps" . "news:g.t.d.apps") + + ;; I think we should shorten using [[:alnum:]] characters if we + ;; can so this would be "I/Bananas" instead of "[/Bananas" + ("nnimap+email@example.com:[Invoices]/Bananas" . "email@example:[/Bananas") + + ;; Both my previous woes in one + ("nnimap+email@banana.salesman.example.com:[Invoices]/Bananas" . "email@banana:[/Bananas") + + ;; What is going on here? Is the "n" from "nnspool" somehow? + ("nnspool+alt.binaries.pictures.furniture" . "n.b.p.furniture")))) -(provide 'gnus-tests) ;;; gnus-tests.el ends here -- 2.33.1