From 06a32b319f065550efe0d2a9ff10ca6bdc32b893 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 23 Jul 2022 20:15:18 +0200 Subject: [PATCH] operon: hopefully better fix for flaky mtime tests copy the mtime after we write everything, so there is no chance of it changing before we note the initial value. --- quodlibet/operon/commands.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/quodlibet/operon/commands.py b/quodlibet/operon/commands.py index e0a5ef33a..af2dcfa8b 100644 --- a/quodlibet/operon/commands.py +++ b/quodlibet/operon/commands.py @@ -227,16 +227,16 @@ class EditCommand(Command): # write to tmp file fd, path = tempfile.mkstemp(suffix=".txt") - # XXX: copy mtime here so we can test for changes in tests by - # setting a out of date mtime on the source song file - copy_mtime(args[0], path) - try: try: os.write(fd, dump) finally: os.close(fd) + # XXX: copy mtime here so we can test for changes in tests by + # setting a out of date mtime on the source song file + copy_mtime(args[0], path) + # only parse the result if the editor returns 0 and the mtime has # changed old_mtime = mtime(path) -- 2.39.2 >commitdiff
path: root/tests/records.scm
AgeCommit message (Expand)Author
2022-12-27records: match-record supports specifying a different variable name....An example: (match-record obj <my-type> (field1 (field2 custom-var-name) field3) ...) * guix/records.scm (match-record-inner): Add support for the new syntax. * tests/records.scm ("match-record, simple"): Add a simple test case for the new syntax. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Attila Lendvai
2022-12-02records: 'match-record' checks fields at macro-expansion time....This allows 'match-record' to be more efficient (field offsets are computed at compilation time) and to report unknown fields at macro-expansion time. * guix/records.scm (map-fields): New macro. (define-record-type*)[rtd-identifier]: New procedure. Define TYPE as a macro and use a separate identifier for the RTD. (lookup-field, match-record-inner): New macros. (match-record): Rewrite in terms of 'match-error-inner'. * tests/records.scm ("match-record, simple") ("match-record, unknown field"): New tests. * gnu/services/cuirass.scm (cuirass-shepherd-service): Rename 'log-file' local variable to 'main-log-file'. * gnu/services/getmail.scm (serialize-getmail-configuration-file): Move after <getmail-configuration-file> definition. Ludovic Courtès
2022-07-01tests: Add sanitizer test....* tests/records.scm ("define-record-type* & sanitize without default value"): New test. Ludovic Courtès
2021-08-12records: Support field sanitizers....* guix/records.scm (make-syntactic-constructor): Add #:sanitizers. [field-sanitizer]: New procedure. [wrap-field-value]: Honor F's sanitizer. (define-record-type*)[field-sanitizer]: New procedure. Pass #:sanitizer to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & sanitize") ("define-record-type* & sanitize & thunked"): New tests. Ludovic Courtès
2021-04-29diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6....* guix/diagnostics.scm (source-properties->location): Add clause for vectors. * guix/ui.scm (report-load-error): Tweak 'read-error' handling for 3.0.6. * tests/guix-package.sh: Relax regexp for the "unbound variable" diagnostic check. * tests/guix-system.sh: Adjust "missing closing paren" check for 3.0.6. * tests/records.scm (location-alist): New procedure. ("define-record-type* & wrong field specifier") ("define-record-type* & wrong field specifier, identifier") ("define-record-type* & duplicate initializers"): Use it. Ludovic Courtès