Skip to content

cond-expand

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
(else
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
(r7rs
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
(foo
(write-u8 65))
(else
(write-u8 66)))

When I successfully run stak main.scm

Then the stdout should contain exactly “B”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((library (scheme base))
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((library (scheme miracle))
(write-u8 65))
(else
(write-u8 66)))

When I successfully run stak main.scm

Then the stdout should contain exactly “B”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand (r7rs))

When I successfully run stak main.scm

Then the exit status should be 0.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand (else))

When I successfully run stak main.scm

Then the exit status should be 0.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((not foo)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((and)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((and r7rs)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((and r7rs r7rs)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((or)
(write-u8 65))
(else
(write-u8 66)))

When I successfully run stak main.scm

Then the stdout should contain exactly “B”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((or r7rs)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.

Given a file named “main.scm” with:

(import (scheme base))
(cond-expand
((or foo r7rs)
(write-u8 65)))

When I successfully run stak main.scm

Then the stdout should contain exactly “A”.