summaryrefslogtreecommitdiff
path: root/testsuite/t-or.scm
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/t-or.scm')
-rw-r--r--testsuite/t-or.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/t-or.scm b/testsuite/t-or.scm
new file mode 100644
index 000000000..0c581e9c7
--- /dev/null
+++ b/testsuite/t-or.scm
@@ -0,0 +1,29 @@
+;; all the different permutations of or
+(list
+ ;; not in tail position, no args
+ (or)
+ ;; not in tail position, one arg
+ (or 'what)
+ (or #f)
+ ;; not in tail position, two arg
+ (or 'what 'where)
+ (or #f 'where)
+ (or #f #f)
+ (or 'what #f)
+ ;; not in tail position, value discarded
+ (begin (or 'what (error "two")) 'two)
+ ;; in tail position (within the lambdas)
+ ((lambda ()
+ (or)))
+ ((lambda ()
+ (or 'what)))
+ ((lambda ()
+ (or #f)))
+ ((lambda ()
+ (or 'what 'where)))
+ ((lambda ()
+ (or #f 'where)))
+ ((lambda ()
+ (or #f #f)))
+ ((lambda ()
+ (or 'what #f))))