From 524c9800afb433cc474132185d8e37f72004adb3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Apr 2021 00:38:03 +0200 Subject: diagnostics, 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. --- tests/guix-system.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/guix-system.sh') diff --git a/tests/guix-system.sh b/tests/guix-system.sh index 238c8929a8..7e992e7bdb 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -51,6 +51,7 @@ then # This must not succeed. exit 1 else + cat "$errorfile" grep "$tmpfile:2:3:.*missing.* initializers" "$errorfile" fi @@ -66,7 +67,12 @@ then # This must not succeed. exit 1 else - grep "$tmpfile:4:1: missing closing paren" "$errorfile" + cat "$errorfile" + + # Guile 3.0.6 gets line/column numbers for 'read-error' wrong + # (zero-indexed): . + grep "$tmpfile:4:1: missing closing paren" "$errorfile" || \ + grep "$tmpfile:3:0: missing closing paren" "$errorfile" fi -- cgit 1.4.1