X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests.lisp;h=08a205da30691231b29a0c7be677f9d796e8502a;hb=ea87515673ba2fd46e6e1ad270c4abf88d575a19;hp=dc5053fbfd549c5053d6d76c71848160899681b9;hpb=042a035d9708f98f43b41ac07171ee0570658c8b;p=kmrcl.git diff --git a/tests.lisp b/tests.lisp index dc5053f..08a205d 100644 --- a/tests.lisp +++ b/tests.lisp @@ -1,4 +1,4 @@ -;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Package: kmrcl-tests -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: tests.lisp,v 1.23 2003/07/31 07:36:55 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg ;;;; @@ -186,6 +186,20 @@ (deftest sse.4 (string-strip-ending "abc" '("ab")) "abc") (deftest sse.5 (string-strip-ending "abcd" '("a" "cd")) "ab") +(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) +(deftest gopt.4 (getopt '("argv" "-c" "val") '(("c" :optional))) ("argv") (("c" . "val")) nil) +(deftest gopt.5 (getopt '("argv" "-c" "val" "v1") '(("c" :optional))) ("argv" "v1") (("c" . "val")) nil) +(deftest gopt.6 (getopt '("--colon" "val" "v1") '(("colon" :optional))) ( "v1") (("colon" . "val")) nil) +(deftest gopt.7 (getopt '("ab" "--colon" "val" "--" "-c") '(("colon" :optional) ("-c" :none))) ("ab" "-c") (("colon" . "val")) nil) +(deftest gopt.8 (getopt '("argv" "-c" "cd") '(("c" :required))) ("argv") (("c" . "cd")) nil) +(deftest gopt.9 (getopt '("argv" "-c") '(("c" :required))) ("argv") nil ("c")) +(deftest gopt.10 (getopt '("argv" "-c=10") '(("c" :required))) ("argv") (("c" . "10")) nil) +(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")) + ;;; MOP Testing (eval-when (:compile-toplevel :load-toplevel :execute)