[Bug-openmcl] Problem with format?

Henry Irvine henryirvine at yahoo.com
Fri Jul 20 01:29:20 MDT 2007


Apologies in advance for the long post, but I have been unable to  
simply re-create this problem.

I am trying to play with test-driven development and would like to  
use the lift test framework.
No problems loading lift via asdf, but when I started fiddling with  
it...

What follows is a (compacted)transcript of the simple examples at the  
begining of the lift user guide

<define a testsuite>
<add a test that passes>
<add a test that fails>
<run tests ... returns a test-result object>
(describe *)   ;;leads to an error


> No previous argument
> " ~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A Expected failure~:P~]~[~:;,  
> ~:*~A Error~:P~]~[~:;, ~:*~A Expected error~:P~]."
>                                ^
>
>    [Condition of type SIMPLE-ERROR]
>
> Restarts:
> 0: [ABORT] Return to SLIME's top level.
> 1: [ABORT-BREAK] Reset this process
> 2: [ABORT] Kill this process
>
> Backtrace:
>   0: (CCL::DO-SUB-FORMAT #<CCL::XP-STREAM #x30004126503D>)
>   1: (CCL::DO-SUB-FORMAT-1 #<XP-STRUCTURE  #x30004127DDED>  
> 'CCL::*LOCATING-CIRCULARITIES*)
>   2: (CCL::DO-XP-PRINTING #<Anonymous Function #x30004094B92F>  
> #<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x300040F6010D> '((1 0 0 0)))
>   3: (CCL::DO-IT #<Anonymous Function #x30004094B92F> #<SWANK- 
> BACKEND::SLIME-OUTPUT-STREAM #x300040F6010D>)
>   4: (CCL::MAYBE-INITIATE-XP-PRINTING #<Anonymous Function  
> #x30004094B92F> #<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x300040F6010D>)
>   5: (FORMAT #<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x300040F6010D> "  
> ~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A Expected failure~:P~]~[~:;,  
> ~:*~A Error~:P~]~[~:;, ~:*~A Expected error~:P~].")
>   6: (#<STANDARD-METHOD DESCRIBE-OBJECT (LIFT::TEST-RESULT T)>  
> #<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x300040F6010D> #<STRING-INPUT- 
> STREAM  #x3000412669ED>)
>   7: (DESCRIBE #<error printing LIFT::TEST-RESULT #x3000412358DD>  
> '(DESCRIBE *))
>   8: (CCL::CALL-CHECK-REGS 'DESCRIBE)
>   9: (SWANK::EVAL-REGION "(describe *)
>      " 'T)
> 10: (#<Anonymous Function #x300040EA22AF> "(describe *)

Since the error occurs in a call to format,   I traced format ...

> SUDOKU> (trace format)
> NIL
> SUDOKU> (run-tests)
> 0> Calling (FORMAT #<TWO-WAY-STREAM input #<SWANK-BACKEND::SLIME- 
> INPUT-STREAM #x300040F580BD>, output #<SWANK-BACKEND::SLIME-OUTPUT- 
> STREAM #x300040F6010D> #x300040F57D9D> "~&Start: ~a" LTE-1)
> Start: LTE-1
> <0 FORMAT returned NIL
> 0> Calling (FORMAT #<STRING-OUTPUT-STREAM  #x3000411FC73D> "Results  
> for ~A " NIL)
> <0 FORMAT returned NIL
> 0> Calling (FORMAT #<STRING-OUTPUT-STREAM  #x3000411FC73D> "~A  
> Test~:P~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A Error~:P~]~[~:;, ~:*~A  
> Expected failure~:P~]~[~:;, ~:*~A Expected error~:P~]" 3 1 0 0 0)
> <0 FORMAT returned NIL
> #<Results for NIL 3 Tests, 1 Failure>
> SUDOKU> (describe *)
> 0> Calling (FORMAT #<SWANK-BACKEND::SLIME-OUTPUT-STREAM  
> #x300040F6010D> "~&Test Report for ~A: ~D test~:P run" NIL 3)
> Test Report for NIL: 3 tests run
> <0 FORMAT returned NIL
> 0> Calling (FORMAT #<SWANK-BACKEND::SLIME-OUTPUT-STREAM  
> #x300040F6010D> " ~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A Expected  
> failure~:P~]~[~:;, ~:*~A Error~:P~]~[~:;, ~:*~A Expected  
> error~:P~]." 1 0 0 0)
> 1> Calling (FORMAT #<CCL::XP-STREAM #x30004123A59D>
>                     "~%~:{~@?~%~}"
>                     (("~1{~:}~%~S~%~V at T^" "No previous argument" NIL
>                       " ~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A  
> Expected failure~:P~]~[~:;, ~:*~A Error~:P~]~[~:;, ~:*~A Expected  
> error~:P~]."
>                       31)))
> <1 FORMAT returned NIL
> 1> Calling (FORMAT NIL "   [Condition of type ~S]" SIMPLE-ERROR)
> <1 FORMAT returned "   [Condition of type SIMPLE-ERROR]"

Pasting the offending call to format into the repl and editing it to  
print to the terminal returns the expected response...

> SUDOKU>  (FORMAT t " ~[~:;, ~:*~A Failure~:P~]~[~:;, ~:*~A Expected  
> failure~:P~]~[~:;, ~:*~A Error~:P~]~[~:;, ~:*~A Expected  
> error~:P~]." 1 0 0 0)
> , 1 Failure.
> NIL
> SUDOKU>

A check of the same inputs to sbcl and clisp does not reproduce the  
error.
Repeating these steps with a bare repl at the command line reproduces  
the problem (not a slime-openmcl interaction)

I guess that it is a problem in openmcl's format?

Henry Irvine



More information about the Bug-openmcl mailing list