From f55f9525030ad3a31f596f6c9447f43a225e6754 Mon Sep 17 00:00:00 2001 From: Alex Chapman Date: Fri, 15 Feb 2008 15:42:14 +1100 Subject: [PATCH] adding strings.lib tests --- extra/strings/lib/lib-tests.factor | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 extra/strings/lib/lib-tests.factor diff --git a/extra/strings/lib/lib-tests.factor b/extra/strings/lib/lib-tests.factor new file mode 100644 index 0000000000..2779e190c9 --- /dev/null +++ b/extra/strings/lib/lib-tests.factor @@ -0,0 +1,8 @@ +USING: kernel sequences strings.lib tools.test ; +IN: temporary + +[ "abcdefghijklmnopqrstuvwxyz" ] [ lower-alpha-chars "" like ] unit-test +[ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ upper-alpha-chars "" like ] unit-test +[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ alpha-chars "" like ] unit-test +[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ] [ alphanumeric-chars "" like ] unit-test +[ t ] [ 100 [ drop random-alphanumeric-char ] map alphanumeric-chars [ member? ] curry all? ] unit-test