From 68286e7ecd6d730025ed98223af92ec9fc21e385 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 22 Jan 2018 19:01:05 -0500 Subject: [PATCH] Integration testing --- match-simple.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/match-simple.scm b/match-simple.scm index 667a5dac..9061f553 100644 --- a/match-simple.scm +++ b/match-simple.scm @@ -146,7 +146,10 @@ ; (begin . body)) ; ((_ ((pat expr) . rest) . body) ; (match expr (pat (match-let* rest . body)))))) -; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; match-simple ends, this is the unit test section: + ;(define tst ; (match-lambda ; ((a b) (vector 'fromlist a b)) @@ -158,6 +161,10 @@ ;(display (tst "gehtdurch")) ;(display (tst 42)) -(display (match "test" ((? string? x) x))) - +(display (match + '(a . b) ;;"test" + ((? pair? x) x) + ((? string? x) x) + (_ 'no-match) + ))