Opened 6 years ago

#1452 new defect

[test egg]: test-group eats the call-chain on error

Reported by: megane Owned by:
Priority: minor Milestone: someday
Component: extensions Version:
Keywords: test egg Cc:
Estimated difficulty:

Description

Below is code that calls an ill behaving function foo three times. Only the third version prints the call-chain.

It should be printed in the two calls inside test-groups as well.

(use test)
 
 (define (f)
   (+ 1 'a))
 
 (test-group "foo"
   (f))
 
 (test-group "bar"
   (test 2 (f)))
 
 (test-begin "baz")
 (f)
 (test-end "baz")
 
 ;; $ csi -qbn test-group-call-chains.scm
 ;;
 ;; Warning: error in group outside of tests
 ;;
 ;; Error: (+) bad argument type: a
 ;; 1 test completed in 0.0 seconds.
 ;; 1 error (100%).
 ;; 0 out of 1 (0%) tests passed.
 ;; -- done testing foo ----------------------------------------------------------
 ;;
 ;;
 ;; -- testing bar ---------------------------------------------------------------
 ;; (f) .................................................................. [ERROR]
 ;;
 ;; Error: (+) bad argument type: a
 ;; 1 test completed in 0.0 seconds.
 ;; 1 error (100%).
 ;; 0 out of 1 (0%) tests passed.
 ;; -- done testing bar ----------------------------------------------------------
 ;;
 ;;
 ;; Error: (+) bad argument type: a
 ;;
 ;;  Call history:
 ;;
 ;;  <eval>    (with-exception-handler89 (##core#lambda (exvar79) (k86 (##core#lambda () (##core#let ((kvar80 (and8...
 ;;  <eval>    (##sys#call-with-values (##core#lambda () (begin67 (test 2 (f)))) (##core#lambda args87 (k86 (##core...
 ;;  <eval>    (test-run102 (lambda103 () 2) (lambda103 () (f)) (cons104 (cons104 (quote105 name106) #f) (quote105 ...
 ;;  <eval>    (cons104 (cons104 (quote105 name106) #f) (quote105 ((source107 f) (source101 f))))
 ;;  <eval>    (cons104 (quote105 name106) #f)
 ;;  <eval>    (f)
 ;;  <eval>    [f] (+ 1 (quote a))
 ;;  <eval>    (k86 (##core#lambda () (##sys#apply ##sys#values args87)))
 ;;  <eval>    (##sys#apply ##sys#values args87)
 ;;  <eval>    (test-end76 name56)
 ;;  <eval>    (current-test-group58 old-group57)
 ;;  <syntax>      (test-begin "baz")
 ;;  <eval>    (test-begin "baz")
 ;;  <syntax>      (f)
 ;;  <eval>    (f)
 ;;  <eval>    [f] (+ 1 (quote a))   <--

Change History (0)

Note: See TracTickets for help on using tickets.