X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests.lisp;h=275b9ba0bff9680c4b9f1401e10f68ef36dca07d;hb=b6ff0c171c1dfd968f6f3bad745a9be1308058e2;hp=08a205da30691231b29a0c7be677f9d796e8502a;hpb=ea87515673ba2fd46e6e1ad270c4abf88d575a19;p=kmrcl.git diff --git a/tests.lisp b/tests.lisp index 08a205d..275b9ba 100644 --- a/tests.lisp +++ b/tests.lisp @@ -186,6 +186,15 @@ (deftest sse.4 (string-strip-ending "abc" '("ab")) "abc") (deftest sse.5 (string-strip-ending "abcd" '("a" "cd")) "ab") +(deftest mua.1 (match-unique-abbreviation "abc" nil) nil) +(deftest mua.2 (match-unique-abbreviation "abc" '("ab")) nil) +(deftest mua.3 (match-unique-abbreviation "ab" '("ab")) 0) +(deftest mua.4 (match-unique-abbreviation "a" '("ab")) 0) +(deftest mua.5 (match-unique-abbreviation "b" '("ab")) nil) +(deftest mua.6 (match-unique-abbreviation "ab" '("ab" "abc")) nil) +(deftest mua.7 (match-unique-abbreviation "ac" '("ab" "ac")) 1) +(deftest mua.8 (match-unique-abbreviation "ac" '("ab" "acb")) 1) + (deftest gopt.1 (getopt '("argv") nil) ("argv") nil nil) (deftest gopt.2 (getopt '("argv" "2") nil) ("argv" "2") nil nil) (deftest gopt.3 (getopt '("argv" "-c") '(("c" :none))) ("argv") (("c")) nil) @@ -199,6 +208,9 @@ (deftest gopt.11 (getopt '("argv" "-c=10") '(("c" :none))) ("argv") nil ("c")) (deftest gopt.12 (getopt '("--along=10") '(("along" :optional))) nil (("along" . "10")) nil) (deftest gopt.13 (getopt '("--along=10") '(("along" :none))) nil nil ("along")) +(deftest gopt.14 (getopt '("--a=10") '(("along" :optional))) nil (("along" . "10")) nil) +(deftest gopt.15 (getopt '("--a=10") '(("along" :optional) ("aboot" :optional))) nil nil ("a")) + ;;; MOP Testing @@ -208,8 +220,8 @@ #+kmrtest-mop (progn - (setf (find-class 'credit-rating) nil) (setf (find-class 'monitored-credit-rating) nil) + (setf (find-class 'credit-rating) nil) (defclass credit-rating () ((level :attributes (date-set time-set))