Opened 14 years ago
Closed 13 years ago
#830 closed defect (fixed)
spock: Error in error message (and missing version number)
| Reported by: | sjamaan | Owned by: | felix winkelmann |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | extensions | Version: | 4.7.x |
| Keywords: | Cc: | ||
| Estimated difficulty: |
Description
There's a bug in Spock's read-honu function when it tries to show an error when reading an unbalanced closing delimiter, it will try to append a character to a string with string-append.
Looking at the other calls to err, it looks like the simplest fix is to remove the string-append call and pass the message and character as separate arguments to err:
Index: honu.scm
===================================================================
--- honu.scm (revision 26685)
+++ honu.scm (working copy)
@@ -83,7 +83,7 @@
((#\() (read-char port) (read-sequence '%parens #\)))
((#\[) (read-char port) (read-sequence '%brackets #\]))
((#\{) (read-char port) (read-sequence '%braces #\}))
- ((#\) #\] #\}) (err (string-append "unexpected closing delimiter" c)))
+ ((#\) #\] #\}) (err "unexpected closing delimiter" c))
(else
(cond ((char-numeric? c) (read-num))
((or (char-alphabetic? c)
This bug was found by the scrutinizer, see http://tests.call-cc.org/master/linux/x86/2012/05/12/salmonella-report/install/spock.html
By the way, spock doesn't specify a version number in its .setup-file which means salmonella shows "unknown" in the list: http://tests.call-cc.org/master/linux/x86/2012/05/12/salmonella-report/
Change History (2)
comment:1 Changed 13 years ago by
| Milestone: | 4.9.0 |
|---|
comment:2 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
