From 68986fe0410584c6934c835bb0ee784655f5f8c5 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Tue, 11 Jan 2022 22:01:23 -0800 Subject: Move scheme compiler into a separate directory. --- strings-test.csc | 60 -------------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 strings-test.csc (limited to 'strings-test.csc') diff --git a/strings-test.csc b/strings-test.csc deleted file mode 100644 index 2e6d240..0000000 --- a/strings-test.csc +++ /dev/null @@ -1,60 +0,0 @@ -(import (scheme base) - (only (csc testing) - assert - assert-equal - test) - (csc strings)) - - -(test prefix?-good - (assert-equal #t (prefix? "asdf" "asdfjkl;"))) - - -(test prefix?-bad - (assert-equal #f (prefix? "asdf" "asdbjkl;"))) - - -(test prefix?-too-long - (assert-equal #f (prefix? "asdf" "as"))) - - -(test str-quote-simple - (assert-equal "\"hello\"" (str-quote "hello"))) - - -(test str-quote-escape - (assert-equal "\"this string \\\" has a quote\"" (str-quote "this string \" has a quote"))) - - -(test find-ok - (assert-equal 8 (find "abc" "dabsadfdabcdfdfd"))) - - -(test find-one-letter - (assert-equal 8 (find "a" "sdfdfdfsasdfe"))) - - -(test find-notfound - (let* ((match "a") - (str "def") - (got-exception '())) - (guard (e - ((not-found-error? e) (set! got-exception e))) - (find match str)) - (assert (not-found-error? got-exception)))) - - -(test join-, - (assert-equal "a,b,c" (join "," "a" "b" "c"))) - - -(test join-none - (assert-equal "" (join ","))) - - -(test join-singleton - (assert-equal "x" (join "," "x"))) - - -(test join-empty - (assert-equal "abc" (join "" "a" "b" "c"))) -- cgit v1.3.1