Evaluation
Import an eval
library
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the exit status should be 0.
Evaluate false
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “B”.
Evaluate a number
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Evaluate a string
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “foo”.
Use an environment
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use two environments
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use an interaction environment
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a +
procedure
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a display
procedure
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “foo”.
Use a define
syntax with a variable
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a define
syntax with a procedure
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “B”.
Use an if
syntax
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “<output>”.
Examples
value | output |
---|---|
#f | B |
#t | A |
Primitives
Use a $$begin
primitive
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a $$if
primitive with a false condition
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “B”.
Use a $$if
primitive with a true condition
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a $$lambda
primitive with no argument
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a $$lambda
primitive with an argument
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Use a $$set!
primitive
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.