Exception
Raise an error
Given a file named “main.scm” with:
When I run scheme main.scm
Then the stderr should contain “Oh, no!”
And the exit status should not be 0.
Raise an error with a value
Given a file named “main.scm” with:
When I run scheme main.scm
Then the stderr should contain “Oh, no!”
And the exit status should not be 0.
Raise an error with a pretty-printed value
Given a file named “main.scm” with:
When I run scheme main.scm
Then the stderr should contain “Oh, no!”
And the stderr should contain “42”
And the exit status should not be 0.
Halt execution on an exception
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stdout should contain exactly “A”.
Raise a non-continuable exception
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stdout should contain exactly "".
Raise a continuable exception
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Raise an exception in a handler
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0.
Raise an exception in nested handlers
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stderr should contain “foo”
And the stdout should contain “bar”.
Raise an exception in deeply nested handlers
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stderr should contain “foo”
And the stdout should contain “bar”
And the stdout should contain “baz”.
Terminate on a continued non-continuable exception
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stdout should contain exactly "".
Terminate on a continued non-continuable exception with a proper message
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stdout should contain exactly ""
And the stderr should contain “exception handler returned on a non-continuable exception”.
Leave a dynamic extent
Given a file named “main.scm” with:
When I run scheme main.scm
Then the exit status should not be 0
And the stdout should contain exactly “AB”.
Use a guard
expression
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use an else
clause in a guard expression
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use nested guard
expressions
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a guard
expression in a clause
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Return from a body in a guard
expression
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Return from an else
clause in a guard
expression
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.