From 741895676b124a8a9a6656a54b5b58fd35d8e0f9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 1 Jul 2022 12:08:22 +0200 Subject: tests: Add sanitizer test. * tests/records.scm ("define-record-type* & sanitize without default value"): New test. --- tests/records.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/records.scm b/tests/records.scm index d014e7a995..00c58b0736 100644 --- a/tests/records.scm +++ b/tests/records.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2012-2016, 2018-2022 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -300,6 +300,15 @@ (string=? (foo-bar r) "baz!") (equal? s r))))) +(test-equal "define-record-type* & sanitize without default value" + 42 + (begin + (define-record-type* foo make-foo + foo? + (bar foo-bar (sanitize 1+))) + + (foo-bar (foo (bar 41))))) + (test-assert "define-record-type* & sanitize & thunked" (let ((sanitized 0)) (define-record-type* foo make-foo @@ -321,6 +330,7 @@ (let ((r (foo (inherit q)))) (and (string=? (foo-bar r) "baz!") (= sanitized 2))))))))) ;no re-sanitization + (test-assert "define-record-type* & wrong field specifier" (let ((exp '(begin (define-record-type* foo make-foo -- cgit v1.2.3 right' method='get' action='/guix/log/.mailmap'>
AgeCommit message (Expand)Author
2017-11-26Update e-mail for ng0....ng0
2017-10-03Update e-mail for Theodoros Foradis....Theodoros Foradis
2017-08-29Update e-mail for Kei Kebreau....Kei Kebreau
2017-08-13mailmap: fix entries for ng0....ng0
2017-06-16mailmap: Adjust entries for ng0....ng0
2017-06-03.mailmap: Add another alias for ng0....ng0
2017-05-23mailmap: Update entries for Adriano Peluso...Adriano Peluso
2017-05-22mailmap: Add an entry for Mathieu Othacehe....Mathieu Othacehe
2017-04-20mailmap: Update entries for ng0....ng0
2017-01-27Update .mailmap entries for ng0....ng0
2017-01-01Update .mailmap....Alex Kost
2016-12-20mailmap: Add alias for Marius Bakke....Marius Bakke
2016-11-26mailmap: Associate all commits by ng0 with ng0....ng0
2016-10-11Update e-mail address for ng0....ng0
2016-10-05Update e-mail address for ng0....ng0
2016-07-15Update e-mail address for Tobias Geerinckx-Rice....Andreas Enge
2016-07-03Update name for ng0....ng0
2016-05-19Update name for Kei Kebreau....Kei Kebreau
2016-05-04Update .mailmap....Alex Kost
2016-03-24Update .mailmap....Alex Kost
2015-08-11Add new entries to .mailmap....Alex Kost
2015-07-04Add '.mailmap'....Alex Kost