From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.bugs Subject: bug#74385: [PATCH 1/4] srfi-64: Fix maybe-print-prop. Date: Sat, 16 Nov 2024 18:42:04 +0100 Message-ID: <20241116174210.9160-1-~@wolfsden.cz> References: <20241116173954.8972-1-~@wolfsden.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tomas Volf <~@wolfsden.cz> To: 74385@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Nov 16 18:43:48 2024 Return-path: Envelope-to: guile-bugs@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 1tCMpo-0004yU-Am for guile-bugs@m.gmane-mx.org; Sat, 16 Nov 2024 18:43:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCMp7-0007nO-BT; Sat, 16 Nov 2024 12:43:05 -0500 Original-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 1tCMp6-0007n6-60 for bug-guile@gnu.org; Sat, 16 Nov 2024 12:43:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCMp5-0001Sn-MY for bug-guile@gnu.org; Sat, 16 Nov 2024 12:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=sAVsh34EpN1DWGc8JlS9r/hhCIealPLC+Ba+YSyDjns=; b=O9xKmnrqn2B2acB8CCa7zIAs0gquB2g8CRBFGP7h3q0K9I/iLnjCaLC8+csP2IhR1Bj/7x88yn1CW60OZ1Y9hK38ekXjBuuGWv/8W2yZIEjefN/GvSvKzZrT67zGmA49X5Sb+xCLCpxwzgeQx2g3E9eiT/FA/EFF9+BK/tlVxlnfneOK9F/yzixsb5WJEw1tBEzsRt8wwNa9x5Pwl5IDa23BnXwefzXty4N2xoA/dHrQFM9i7TKu1yCHfZpuxV3dLmoB7CF7Wl7rhwnWVVzVJgW1NcSBIDnSRUG6SOX8mYrMCra623um+TfoSVYCsZWi8ZueXVZNFlkSIDBi2zd7Qg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCMp4-0006fa-Fz for bug-guile@gnu.org; Sat, 16 Nov 2024 12:43:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <20241116173954.8972-1-~@wolfsden.cz> Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 16 Nov 2024 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74385 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 74385-submit@debbugs.gnu.org id=B74385.173177893925547 (code B ref 74385); Sat, 16 Nov 2024 17:43:02 +0000 Original-Received: (at 74385) by debbugs.gnu.org; 16 Nov 2024 17:42:19 +0000 Original-Received: from localhost ([127.0.0.1]:54678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCMoM-0006dt-MB for submit@debbugs.gnu.org; Sat, 16 Nov 2024 12:42:18 -0500 Original-Received: from wolfsden.cz ([37.205.8.62]:40528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tCMoL-0006dS-3i for 74385@debbugs.gnu.org; Sat, 16 Nov 2024 12:42:17 -0500 Original-Received: by wolfsden.cz (Postfix, from userid 104) id 4FBE3352E25; Sat, 16 Nov 2024 17:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1731778936; bh=AmcocLMOPUbQs4KwUJFnUmFXT9NeHGxj3hg6LPUJuxw=; h=From:To:Cc:Subject:Date; b=ywJ+OSYTSe6ceGCPTvlb0oK4rznUkVKlTTkO4LWYNLmsE4ghAJ3PSolxmCB/dXnKi PWaXGKQbIpDo1LN4MDPyjqm4WP1QWaCfuNlqGsscBwaMdFlfPQOR9rm8w+8EIKIqge Ub49nImkroyN/zRM4JCP2/jfX4XqwQxWvI85Ts/571W+jZQC1xAT/KIe114/QsSphG g0AoZkx9N5XYmzhgbSg7ayx+IHNZeT4olHyvk1w54bWrLdGO3/+EGB+WGT9Ws6lJgy 6WaG4NE+sOz53JQ0JDb6ifyyMxYfwnOT7JaIHFp+AYGTVyPCD+Dezp6Uh1TX6Q6qld uQ6cDR4d2BeaqigiD8LW4Ep9RXkj1pcD9S2kLG0qLW4mv8UT40rBIazYYABSHVKOTo juBDEcz7WwZlc62jSarBA7FOfm0MM5s3EwUW9Wb4IFyO2jlZCDIUBen9fFfTHXGaAb qMPOGGGQbCNfvKbomwhbYxTxbFiZjmQzYMu1VOA+8b1LofGQ7SFqgNRxtIg40gESH0 TMa5eo5ZCNRqst9sSlRwrPVKxQmmHtvZ7ZsysuBn05IBAtBTacHbROZI6cq+MZAO9c Ox65l+8jOHLcm7iHloxbXFoHxL9+jNFVlInN4M8vM1CPBkTdT545P82Y+gpvxuwsNg Yl5yAwPAxxxWxLtPYdId9TcE= Original-Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 07C4F35360C; Sat, 16 Nov 2024 17:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1731778936; bh=AmcocLMOPUbQs4KwUJFnUmFXT9NeHGxj3hg6LPUJuxw=; h=From:To:Cc:Subject:Date; b=ywJ+OSYTSe6ceGCPTvlb0oK4rznUkVKlTTkO4LWYNLmsE4ghAJ3PSolxmCB/dXnKi PWaXGKQbIpDo1LN4MDPyjqm4WP1QWaCfuNlqGsscBwaMdFlfPQOR9rm8w+8EIKIqge Ub49nImkroyN/zRM4JCP2/jfX4XqwQxWvI85Ts/571W+jZQC1xAT/KIe114/QsSphG g0AoZkx9N5XYmzhgbSg7ayx+IHNZeT4olHyvk1w54bWrLdGO3/+EGB+WGT9Ws6lJgy 6WaG4NE+sOz53JQ0JDb6ifyyMxYfwnOT7JaIHFp+AYGTVyPCD+Dezp6Uh1TX6Q6qld uQ6cDR4d2BeaqigiD8LW4Ep9RXkj1pcD9S2kLG0qLW4mv8UT40rBIazYYABSHVKOTo juBDEcz7WwZlc62jSarBA7FOfm0MM5s3EwUW9Wb4IFyO2jlZCDIUBen9fFfTHXGaAb qMPOGGGQbCNfvKbomwhbYxTxbFiZjmQzYMu1VOA+8b1LofGQ7SFqgNRxtIg40gESH0 TMa5eo5ZCNRqst9sSlRwrPVKxQmmHtvZ7ZsysuBn05IBAtBTacHbROZI6cq+MZAO9c Ox65l+8jOHLcm7iHloxbXFoHxL9+jNFVlInN4M8vM1CPBkTdT545P82Y+gpvxuwsNg Yl5yAwPAxxxWxLtPYdId9TcE= X-Mailer: git-send-email 2.46.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11102 Archived-At: Previously it always printed the property, regardless of whether it was set or not. * module/srfi/srfi-64.scm (test-on-test-end-simple)[maybe-print-prop]: Print only set properties. --- module/srfi/srfi-64.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/module/srfi/srfi-64.scm b/module/srfi/srfi-64.scm index 98fcef645..13ae26d48 100644 --- a/module/srfi/srfi-64.scm +++ b/module/srfi/srfi-64.scm @@ -418,15 +418,16 @@ instead." (define (test-on-test-end-simple runner) "Log that test is done." (define (maybe-print-prop prop pretty?) - (let* ((val (test-result-ref runner prop)) - (val (string-trim-both - (with-output-to-string - (λ () - (if pretty? - (pretty-print val #:per-line-prefix " ") - (display val))))))) - (when val - (format #t "~a: ~a~%" prop val)))) + (let* ((default (list)) + (val (test-result-ref runner prop default))) + (unless (eq? val default) + (let ((val (string-trim-both + (with-output-to-string + (λ () + (if pretty? + (pretty-print val #:per-line-prefix " ") + (display val))))))) + (format #t "~a: ~a~%" prop val))))) (let ((result-kind (test-result-kind runner))) ;; Skip tests not executed due to run list. -- 2.46.0