From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +EhyAVM3a2O9lQAAbAwnHQ (envelope-from ) for ; Wed, 09 Nov 2022 06:14:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gP1sAVM3a2OKJAEA9RJhRA (envelope-from ) for ; Wed, 09 Nov 2022 06:14:59 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B61BA2F7AF for ; Wed, 9 Nov 2022 06:14:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osdPj-0001mX-Rs; Wed, 09 Nov 2022 00:14:15 -0500 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 1osdPg-0001jx-6d for emacs-orgmode@gnu.org; Wed, 09 Nov 2022 00:14:12 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osdPe-00010m-7N for emacs-orgmode@gnu.org; Wed, 09 Nov 2022 00:14:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E29B8240026 for ; Wed, 9 Nov 2022 06:14:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667970847; bh=Q9x8u5WRdg1RELisS8Tn2vJpvthmFzdf/psFaB2J/Ww=; h=From:To:Cc:Subject:Date:From; b=GYNQfy65aVxAgejlJDbUccFt0FIewbuJLpb+7hrI0OZlIJmxBWcckhBM8QEEgFAsC 1ajYpqdnwrSnNYu8txrltJdT/A9istVs7bVChayoDWTQiX9pMTxAkKznvvaAS7u7uc p5xIAqtRua6XGPDfUGSVSawvTam7YrdLjdp+q+hdo+D8GVscL9eYHFUrDfhyXQztDV +X0CeRqeMKBg1Iayzcm24ZjDC6ay+seb3crc3UZqARkNJ1H5irtMp5HHv9F3CDetEW 8VY3zGylWA2+APc1zCx+U8I0LeN2nXcLRy/Ta/lByZ40PsVFoSLY0Rwffe6Yz++YfZ Zax1EmDQGwQJQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N6Y6Q3Gcvz9rxD; Wed, 9 Nov 2022 06:14:06 +0100 (CET) From: Ihor Radchenko To: Leo Butler Cc: Org Mode Mailing List Subject: Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects In-Reply-To: <87zgd1b4rn.fsf_-_@t14.reltub.ca> References: <87mt92elyy.fsf@t14.reltub.ca> <87mt9128sz.fsf@localhost> <87zgd1b4rn.fsf_-_@t14.reltub.ca> Date: Wed, 09 Nov 2022 05:14:45 +0000 Message-ID: <8735asbtfe.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667970898; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=M03j2hqnlkuboQV0fk1c7q48HCWmg6kLpDXtfow/POI=; b=mF9gs53igWHRPrdtHTO66Grda9oLf9DDcedwfqi0dLOCtu20TPYGSU5x/extfL/x3Y8zXK qsVOBnvdiJNa4W6ABK+AiW7nuf6sKjzHUpoPVR4BlDfpr/YoH9GJjmBJmo8lBuWn9Ukif3 Lej2vZBp+Cdo2jLsC2uxcWzpkpW7YUwU7BTClBypl0W/a603txgPgAhGDvD0K0ObP/FmA1 Jk7aRczLTayOwthGR68Vv3tI76QP5rqxxhagWgSHjBZVNaBNZXhvZyUzDcB0pN9dv14L4q 5TRR1Z4hHfQB/q/ykcr2Zru9SIOc7H2S2cRJsKcSR+Hf+HBsop3yFOxC4mdgfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667970898; a=rsa-sha256; cv=none; b=CqH+IozfTGfP0gi4s7zJKMEu6HFd9BS1+TCyIZeatbmQTpa3QalXJVxpkfxNHJiBY5gKvZ 8XeFtNpIL0XNtYGm0SY/ZGuNTaETaoCv+86bV54AGL3ah+wgJM/nqrxDRWScMjkCMUJ8In FcF2nqXA7ZNKJ6bCbwfPdbGUV2SbrMb5gGAXPsWn1cCZACaCRATXIZFgzmf6jleomPG1bI iTiWCI+AqMxh8zuwtpkDlcsjrb7+/zQ/wqZQVsRBHMiDavNooAHXYXI1Mh0qxXXOdQSsuz ZpQRVbFipEfDD/7EbeV9iA00Pj59ykCTohaWLGmLS3wemEkalpdN+xFnwy7rjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GYNQfy65; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.82 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GYNQfy65; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B61BA2F7AF X-Spam-Score: -8.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: G0sMs1TsYckj Leo Butler writes: > Ihor, > Thanks for your feeback and the pointer. I have revised the tests and > attach the revised patch. Thanks! Note that your patch is over 15LOC, which exceeds legally allowed contribution size for people without copyright assignment. Would you be interested to sign the copyright assignment form and send it to FSF? See https://orgmode.org/worg/org-contribute.html#copyright for details. The process usually takes a few days on FSF side (they are obliged to reply within 5 working days). Below are some comments. > * testing/lisp/test-ob-octave.el: > > Add the tests ob-octave/graphics-file and > ob-octave/graphics-file-session. The first test verifies that the Please use double space " " between sentences. See https://orgmode.org/worg/org-contribute.html#commit-messages > - (format "print -dpng %s" gfx-file)) > + (format "print -dpng %s\nans=%S" gfx-file gfx-file)) Is there any reason why %S but not %s? > * Graphical tests > -#+begin_src octave :results graphics :file chart.png > + > +Graphics file. This test is performed by =ob-octave/graphics-file= in =testing/lisp/test-ob-octave.el=. By convention, we use double space in distributed Org files and ~code~ for symbol markup. See doc/Documentation_Standards.org. (It is not strictly necessary here, but would be nice to be consistent) > + (org-babel-execute-src-block) > + (should (search-forward (format "[[file:%s]]" file) nil nil)) > + (should (file-readable-p file)) > + (should (let ((size (nth 7 (file-attributes file)))) It would be more clear to use `file-attribute-size' instead of `nth'. > + (> size 0))) > + (should (not (get-buffer "*Org-Babel Error Output*")))) `should-not' would be a bit more succinct. > + (should (let ((size (nth 7 (file-attributes file)))) > + (> size 0))) > + (should (not (get-buffer "*Org-Babel Error Output*")))) See the previous comment. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at