42
42
(resf (tmp " tmp-argparse-result-" name)))
43
43
` (deftest , name
44
44
, (write-tmp-file testf send-lst)
45
- (assert (= 0 (unix :system , (format nil " eus ~A ~A 2>/dev/null 1>~A " testf command resf))))
45
+ (assert (= 0 (unix :system , (format nil " ~A ~A ~A 2>/dev/null 1>~A "
46
+ (car lisp ::*eustop-argument* ) testf command resf))))
46
47
(let ((alst (read-file , resf)))
47
48
,@ (mapcar #' (lambda (res)
48
49
` (assert (and (assoc , (car res) alst)
54
55
(resf (tmp " tmp-argparse-result-" name)))
55
56
` (deftest , name
56
57
, (write-tmp-file testf send-lst)
57
- (assert (= 0 (unix :system , (format nil " eus ~A --help 2>/dev/null 1>~A " testf resf))))
58
+ (assert (= 0 (unix :system , (format nil " ~A ~A --help 2>/dev/null 1>~A "
59
+ (car lisp ::*eustop-argument* ) testf resf))))
58
60
(let ((str1 , result)
59
61
(str2 (string-right-trim ' (#\Space #\Newline ) (read-binary-file , resf))))
60
62
(assert (string= str1 str2))))))
63
65
(let ((testf (tmp " tmp-argparse-test-" name)))
64
66
` (deftest , name
65
67
, (write-tmp-file testf send-lst)
66
- (assert (= 256 (unix :system , (format nil " eus ~A ~A 2>/dev/null 1>/dev/null" testf command)))))))
68
+ (assert (= 256 (unix :system , (format nil " ~A ~A ~A 2>/dev/null 1>/dev/null"
69
+ (car lisp ::*eustop-argument* ) testf command)))))))
67
70
68
71
69
72
; ; HELP TESTS
@@ -336,7 +339,7 @@ optional arguments:
336
339
(:add-argument " -cc" :help " Callback with compiled function"
337
340
:action #' print )
338
341
(:add-argument " -ccf" :help " Callback with compiled function"
339
- :action #' lisp-implementation-version )
342
+ :action #' lisp-implementation-type )
340
343
(:add-argument " --count" :action :count )
341
344
(:add-argument ' (" --append" " -a" ) :action :append :read t :choices (list 1 2 3 ))
342
345
(:add-argument " --const" :const 10 :action :store-const ))
@@ -530,15 +533,15 @@ optional arguments:
530
533
(:add-argument " -cc" :help " Callback with compiled function"
531
534
:action #' print )
532
535
(:add-argument " -ccf" :help " Callback with compiled function"
533
- :action #' lisp-implementation-version )
536
+ :action #' lisp-implementation-type )
534
537
(:add-argument " --count" :action :count )
535
538
(:add-argument ' (" --append" " -a" ) :action :append :read t :choices (list 1 2 3 ))
536
539
(:add-argument " --const" :const 10 :action :store-const ))
537
540
538
541
(defargparse-test parse-overall.2
539
542
" --arg=a --req=3 --def=2 -ff --dest=b -ccf --count"
540
543
((:arg " a" ) (:req 3 ) (:def 2 ) (:remap " b" ) (:flag nil ) (:flag-false nil )
541
- (:ca nil ) (:cf nil ) (:cc nil ) (:ccf #. (lisp-implementation-version )) (:count 1 )
544
+ (:ca nil ) (:cf nil ) (:cc nil ) (:ccf #. (lisp-implementation-type )) (:count 1 )
542
545
(:append nil ) (:const nil ))
543
546
(:init :description " Program Description" :prog " test.l" )
544
547
(:add-argument " --arg" :help " The 'arg' argument" :required t )
@@ -554,7 +557,7 @@ optional arguments:
554
557
(:add-argument " -cc" :help " Callback with compiled function"
555
558
:action #' print )
556
559
(:add-argument " -ccf" :help " Callback with compiled function"
557
- :action #' lisp-implementation-version )
560
+ :action #' lisp-implementation-type )
558
561
(:add-argument " --count" :action :count )
559
562
(:add-argument ' (" --append" " -a" ) :action :append :read t :choices (list 1 2 3 ))
560
563
(:add-argument " --const" :const 10 :action :store-const ))
0 commit comments