I fixed some bugs and changed test-error to detect using message string too because of 'misc-error and 'syntax-error. For example, "^missing or extra expression" and "^string contains #\\\\nul character" are both 'misc-error.
Example1: just check whether a exception occurs? scheme@(guile-user)> (use-modules (srfi srfi-64)) scheme@(guile-user)> (test-begin "wrong-type-arg") %%%% Starting test wrong-type-arg (Writing full log to "wrong-type-arg.log") $1 = ("wrong-type-arg") scheme@(guile-user)> (test-error #t (+ "1" 2)) $2 = pass scheme@(guile-user)> (test-end) # of expected passes 1 $3 = (1 0 0 0 0) Example2: check a specific exception occurs? scheme@(guile-user)> (use-modules (srfi srfi-64)) scheme@(guile-user)> (test-begin "wrong-type-arg") %%%% Starting test wrong-type-arg (Writing full log to "wrong-type-arg.log") $1 = ("wrong-type-arg") scheme@(guile-user)> (test-error 'wrong-type-arg (+ "1" 2)) $2 = pass scheme@(guile-user)> (test-end) # of expected passes 1 $3 = (1 0 0 0 0) Example3: check a exception throw a certain message? scheme@(guile-user)> (use-modules (srfi srfi-64)) scheme@(guile-user)> (test-begin "wrong-type-arg") %%%% Starting test wrong-type-arg (Writing full log to "wrong-type-arg.log") $1 = ("wrong-type-arg") scheme@(guile-user)> (test-error "^Wrong type" (+ "1" 2)) $2 = pass scheme@(guile-user)> (test-end) # of expected passes 1 $3 = (1 0 0 0 0) 2012/4/13 Sunjoong Lee <sunjo...@gmail.com> > Hello, world! :) > > I'm a newbie of scheme. I'd heard the testing framework SRFI-64 but failed > to use it on Guile 2.0. > After attempt to solve this problem, I made a guile module to pass the > test suite for SRFI-64 by Donovan Kolbly. >
srfi-64.scm
Description: Binary data