From e0b3cbd1b1a1042263d9b57844613a70a1874b5b Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 25 Feb 2003 13:20:13 +0000 Subject: [PATCH] Small set of tests for strings and chars. --- scsh/test/strings-and-chars-test.scm | 15 +++++++++++++++ scsh/test/test-packages.scm | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 scsh/test/strings-and-chars-test.scm diff --git a/scsh/test/strings-and-chars-test.scm b/scsh/test/strings-and-chars-test.scm new file mode 100644 index 0000000..0c4c20c --- /dev/null +++ b/scsh/test/strings-and-chars-test.scm @@ -0,0 +1,15 @@ +(add-test! 'file-name-sans-extension 'string-and-chars + (lambda () + (and (string=? (file-name-sans-extension ".scm") ".scm") + (string=? (file-name-sans-extension "/.scm") "/.scm") + (string=? (file-name-sans-extension "a/.scm") "a/.scm") + (string=? (file-name-sans-extension "t.scm") "t") + (string=? (file-name-sans-extension "a/t.scm") "a/t") + (string=? (file-name-sans-extension "/a/t.scm") "/a/t") + (string=? (file-name-sans-extension "/a/b.c/t.scm") "/a/b.c/t") + (string=? (file-name-sans-extension "") "") + (string=? (file-name-sans-extension "t") "t") + (string=? (file-name-sans-extension "a/t") "a/t") + (string=? (file-name-sans-extension "/a/t") "/a/t") + (string=? (file-name-sans-extension "/a/b.c/t") "/a/b.c/t")))) + \ No newline at end of file diff --git a/scsh/test/test-packages.scm b/scsh/test/test-packages.scm index 3ee0f31..7ca5d83 100644 --- a/scsh/test/test-packages.scm +++ b/scsh/test/test-packages.scm @@ -70,6 +70,11 @@ (lambda () (> (string-length (system-name)) 0))))) +(define-structure strings-and-chars-test (export) + (open scheme-with-scsh + test-base) + (files strings-and-chars-test)) + (define-structure test-all (export test-all) (open scheme @@ -77,7 +82,8 @@ add-env-test process-state-test system-parameter-tests - file-system-test)) + file-system-test + strings-and-chars-test))