diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-10-10 10:22:43 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-10-10 23:12:03 +0200 |
commit | a6e22d84450450cacc6fc36445f6ae378a5b7ad0 (patch) | |
tree | 2e5043bed9e51706a51f95bcd6f7b23c2ba45ba5 /tests | |
parent | 3f81ca324b92fca653df26be112d866ea019e16a (diff) | |
download | guix-a6e22d84450450cacc6fc36445f6ae378a5b7ad0.tar.gz guix-a6e22d84450450cacc6fc36445f6ae378a5b7ad0.zip |
ui: Improve reporting of missing closing parentheses.
Suggested by Ricardo Wurmus.
Works around <https://bugs.gnu.org/28295>.
* guix/ui.scm (report-load-error): Add case for 'read-error'.
* tests/guix-system.sh: Test missing-closing-paren errors.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-system.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/guix-system.sh b/tests/guix-system.sh index d575795ea0..31ee637133 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -53,6 +53,21 @@ else fi +cat > "$tmpfile"<<EOF +;; This is line 1, and the next one is line 2. + (operating-system +;; This is line 3, and there is no closing paren! +EOF + +if guix system vm "$tmpfile" 2> "$errorfile" +then + # This must not succeed. + exit 1 +else + grep "$tmpfile:4:1: missing closing paren" "$errorfile" +fi + + # Reporting of unbound variables. cat > "$tmpfile" <<EOF |