From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OBipASRj0l7iMAAA0tVLHw (envelope-from ) for ; Sat, 30 May 2020 13:44:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +H0oOSNj0l5vTwAA1q6Kng (envelope-from ) for ; Sat, 30 May 2020 13:44:03 +0000 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 1CCFA940668 for ; Sat, 30 May 2020 13:44:03 +0000 (UTC) Received: from localhost ([::1]:55964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf1mL-00075I-Pi for larch@yhetil.org; Sat, 30 May 2020 09:44:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf1lv-00074x-Vx for emacs-orgmode@gnu.org; Sat, 30 May 2020 09:43:36 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jf1lv-0005mh-6P for emacs-orgmode@gnu.org; Sat, 30 May 2020 09:43:35 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590846212; cv=none; d=zohomail.com; s=zohoarc; b=j3/RntYmJH1+gnYQ8Efvc3wgW61BJ/jKlF+c1YWww114RatUiPf4kiGWcZ7+N+2IpoQKJaRRoOMeYaqe9Uss7Iv0scS4jA/51C6euCc7dP72mWexhwzjaEZKCXOqFvllN3ZZimQ3I7ztFk8SorKSv53D0zfT1lkZzR1+32rCiVg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590846212; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=d1lSRQBs4pRQfIiclbozDkrMLdQeDjta8qoNR8x5QE4=; b=PFiN7H0Sf0j+hj8qa5VO2/xP7cgZjdlszg2ALFAWLsTXa6wIxGH1IgZ+saYR7Le+WQZXSAEHsy6/lcFZevryxUoGs9+PvH/IFa3/Rt8nObgc0VGRhhyD+LpGjZD2jASCURnwutRuxB3M+ut9dfAlQIbZvkL9+2f22ZiLkxLKy/c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=nivekuil.com; spf=pass smtp.mailfrom=kevin@nivekuil.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590846212; s=mail; d=nivekuil.com; i=kevin@nivekuil.com; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=d1lSRQBs4pRQfIiclbozDkrMLdQeDjta8qoNR8x5QE4=; b=Z/rwS8SeVMmeSZjx8OH+1EFLXAcRTlPzZeAXLD4Q4PL61V5L9sVGcq20kKA8KPeH vPBVHfvI1nMiMCCv9CHhIyMtBxeXqUJeiQ0PpJea+51jstoNBsohvpKC35ATTgq54p5 mvZS4Ds+Izd+nLYueRIWJ+q3wYFK0OTLrU7G3/zY= Received: from machina (71.212.158.154 [71.212.158.154]) by mx.zohomail.com with SMTPS id 1590846209925763.7639331453136; Sat, 30 May 2020 06:43:29 -0700 (PDT) User-agent: mu4e 1.5.1; emacs 27.0.91 From: Kevin Liu To: emacs-orgmode@gnu.org Subject: nondeterministic org-test-with-temp-text? Date: Sat, 30 May 2020 06:43:29 -0700 Message-ID: <874krxpmgu.fsf@nivekuil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: none client-ip=136.143.188.51; envelope-from=kevin@nivekuil.com; helo=sender4-of-o51.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/30 09:29:52 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, T_DKIM_INVALID=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none (invalid DKIM record) header.d=nivekuil.com header.s=mail header.b=Z/rwS8Se; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: WOjtUp0dMQG6 I=E2=80=99m trying to add a test (which should fail at the moment, represen= ting an org-mode bug), but it seems like each =E2=80=98should=E2=80=99 form is a= ctually nondeterministic. The first form returns nil on the first eval and t on subsequent evals, its behavior resetting upon any command, and the second form does the inverse, returning t on the first eval and nil on subsequent evals. Is this behavior expected? (ert-deftest test-org/org-next-visible-heading () (should (org-test-with-temp-text "* A\n** B\n\n\n* C" (org-overview) (org-cycle) (org-cycle) (org-next-visible-heading 1) (and (bolp) (org-at-heading-p)))) (should (org-test-with-temp-text "* A\n** B\n\n\n* C" (org-overview) (org-cycle) (org-cycle) (org-cycle) (org-next-visible-heading 1) (and (bolp) (org-at-heading-p)))))