From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Testing fontification, indentation, and buffer manipulation Date: Wed, 16 Jan 2019 01:45:07 +0700 Message-ID: References: <7803c5de-e139-01ed-e9e3-98abb875782b@grinta.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1547577879 19811 195.159.176.226 (15 Jan 2019 18:44:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2019 18:44:39 +0000 (UTC) Cc: Emacs developers To: Daniele Nicolodi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 15 19:44:35 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjThT-000517-3D for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2019 19:44:35 +0100 Original-Received: from localhost ([127.0.0.1]:47797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjTja-0001jG-5o for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2019 13:46:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjTiS-0001dg-Fb for emacs-devel@gnu.org; Tue, 15 Jan 2019 13:45:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjTiR-0000S5-Ap for emacs-devel@gnu.org; Tue, 15 Jan 2019 13:45:36 -0500 Original-Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:34159) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjTiQ-0000IZ-Nm for emacs-devel@gnu.org; Tue, 15 Jan 2019 13:45:34 -0500 Original-Received: by mail-oi1-x22a.google.com with SMTP id r62so2981598oie.1 for ; Tue, 15 Jan 2019 10:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b2UKyH6Z6Kzf+s+Dch9rKFRudxw9BBo4a9auDdE7AVo=; b=KPKSbUCZxPtItpGSkbxmIJfiiGBzVI+lI1vSKM0H6DyuAie7Zs12fhgmlVH1tC/Blp 8FaGjHqB5fx8XtEG8nSDQ9Q0TqtGYXSj9FC1Cqdl7XqdiZ8y+tfkI2TQ+8/MZYLcsycH DNFfgmGc0gIY6H9LRmlOm97WzlNRb72x5IO7AlNzkZNFsYdtluthz2UDAiamX64eO3Yv etpEuViQ+8Ges+QEnjswab2WC4rarE9h3u4iGQuAJf2Bd+km4JCChk+VDEzkiEVUx3he Z+NkyqbsqmGNf5aPW4hXbrBps8fFfzKO8O9/RPK+dqsWfh7yRDa8j3NEn0Hh0GLrAM7q BMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b2UKyH6Z6Kzf+s+Dch9rKFRudxw9BBo4a9auDdE7AVo=; b=kMwLTK52h1n87AaDJkK/rJAjHr/+yVjGYy2k54G/wM6BUTV8gsN9iOj5OnP9KBg+gf Vste2ExtCBsVSd0cWoZEY/XTZlcxW6On1W4Uo8UX3uNQg3l3k09ZINXSZEPU6oIjTiOU acFp3GHhBG8q1lJcUkE+BNoRnRrXRO8c3+9wuwryzNTQDhUThLqmZ/2IDLihStjSLRo+ yFNLG/ZzMyP1v+MV/mErfFAjkY7SQ7nW0yDpfIdaahJlCrpLnMadfqjjFwNVpqFcQdUv cILje7nlMBXXh2+Nd3y9pFThQdgZ3PYTw7oRDDCSqUfMyEPPBoP5+ZkP/jWsKBmpiQ2c W3nA== X-Gm-Message-State: AJcUukcs68608kmy/x8FG391z9eEq8UsxN7Dgr1apdLOjLAniN+KbRyS KWaukifmDwDdE7hBQUjiR+Z/2wiwvNafzwFaNI1g9Yai X-Google-Smtp-Source: ALg8bN6DuvNi4cXq2Y2JmZbBUIy02AMMqfcy8Whcrkk0t/RZIj+p7amRDQpn9VlvdDSn7MFEf9ne4Ppuez8J84g803g= X-Received: by 2002:a54:4f8f:: with SMTP id g15mr2835897oiy.166.1547577919955; Tue, 15 Jan 2019 10:45:19 -0800 (PST) In-Reply-To: <7803c5de-e139-01ed-e9e3-98abb875782b@grinta.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232369 Archived-At: On Tue, Jan 15, 2019 at 10:52 PM Daniele Nicolodi wrote: > I am hacking on beancount-mode (a mode to edit Beancount ledger files) > and I would like to write some automated tests to check the > functionality of the minor mode. I found ERT, but it seems that it does > not offer any facility to easily test fontification, indentation, or > buffer manipulation in general. > > Is there any facility that would help in writing such tests? You might want to look at ledger-mode tests. Its approach to fontification testing is: * Create a temporary buffer. * Put test text into it. * Harvest it back with fontification properties into a data structure. * Test that this structure is equal to the golden output. https://github.com/ledger/ledger-mode/blob/master/test/test-helper.el#L149 https://github.com/ledger/ledger-mode/blob/master/test/fontify-test.el