Skip to content

Commit 060da46

Browse files
committed
Update argparse tests
1 parent e33942c commit 060da46

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

test/argparse.l

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
(resf (tmp "tmp-argparse-result-" name)))
4343
`(deftest ,name
4444
,(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))))
4647
(let ((alst (read-file ,resf)))
4748
,@(mapcar #'(lambda (res)
4849
`(assert (and (assoc ,(car res) alst)
@@ -54,7 +55,8 @@
5455
(resf (tmp "tmp-argparse-result-" name)))
5556
`(deftest ,name
5657
,(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))))
5860
(let ((str1 ,result)
5961
(str2 (string-right-trim '(#\Space #\Newline) (read-binary-file ,resf))))
6062
(assert (string= str1 str2))))))
@@ -63,7 +65,8 @@
6365
(let ((testf (tmp "tmp-argparse-test-" name)))
6466
`(deftest ,name
6567
,(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)))))))
6770

6871

6972
;; HELP TESTS
@@ -336,7 +339,7 @@ optional arguments:
336339
(:add-argument "-cc" :help "Callback with compiled function"
337340
:action #'print)
338341
(:add-argument "-ccf" :help "Callback with compiled function"
339-
:action #'lisp-implementation-version)
342+
:action #'lisp-implementation-type)
340343
(:add-argument "--count" :action :count)
341344
(:add-argument '("--append" "-a") :action :append :read t :choices (list 1 2 3))
342345
(:add-argument "--const" :const 10 :action :store-const))
@@ -530,15 +533,15 @@ optional arguments:
530533
(:add-argument "-cc" :help "Callback with compiled function"
531534
:action #'print)
532535
(:add-argument "-ccf" :help "Callback with compiled function"
533-
:action #'lisp-implementation-version)
536+
:action #'lisp-implementation-type)
534537
(:add-argument "--count" :action :count)
535538
(:add-argument '("--append" "-a") :action :append :read t :choices (list 1 2 3))
536539
(:add-argument "--const" :const 10 :action :store-const))
537540

538541
(defargparse-test parse-overall.2
539542
"--arg=a --req=3 --def=2 -ff --dest=b -ccf --count"
540543
((: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)
542545
(:append nil) (:const nil))
543546
(:init :description "Program Description" :prog "test.l")
544547
(:add-argument "--arg" :help "The 'arg' argument" :required t)
@@ -554,7 +557,7 @@ optional arguments:
554557
(:add-argument "-cc" :help "Callback with compiled function"
555558
:action #'print)
556559
(:add-argument "-ccf" :help "Callback with compiled function"
557-
:action #'lisp-implementation-version)
560+
:action #'lisp-implementation-type)
558561
(:add-argument "--count" :action :count)
559562
(:add-argument '("--append" "-a") :action :append :read t :choices (list 1 2 3))
560563
(:add-argument "--const" :const 10 :action :store-const))

0 commit comments

Comments
 (0)