Summary
spock: Error in error message (and missing version number)
Metadata
- Id: a19cbad49c6d2b2d321811dc002db3b96ffb43d6
- Trac id: 830
- Type: defect
- Reporter: sjamaan
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone:
- Version: 4.7.x
- Changetime: 2012-06-05 11:20:20 UTC
- Created: 2012-05-13 12:00:18 UTC
- Keywords:
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/