Summary

spock: Error in error message (and missing version number)

Metadata

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/

Changes and comments

[2012-06-04 16:25:14 UTC] felix removed milestone 4.9.0

[2012-06-05 11:20:20 UTC] felix changed status from new to closed

[2012-06-05 11:20:20 UTC] felix set resolution to fixed