racket/cmdline: fix table filtering when #:ps is used

This commit is contained in:
Matthew Flatt 2017-03-24 17:06:04 -06:00
parent 144486dcc0
commit 41e3deab97
2 changed files with 10 additions and 0 deletions

View File

@ -215,4 +215,12 @@
(test 'ok parse-command-line "test" #("x") null (case-lambda [(x) 'none] [(x . ys) 'ok]) '("arg"))
(test 'ok parse-command-line "test" #("x") null (case-lambda [(x) 'none] [(x y . z) 'ok]) '("arg"))
;; test that `#:ps` doesn't mess up error reporting
(err/rt-test (let ([args "args"])
(command-line
#:program "something"
#:argv #("-x")
#:ps "Stuff"))
(lambda (x) (regexp-match? #rx"unknown switch" (exn-message x))))
(report-errs)

View File

@ -414,6 +414,8 @@
null]
[(eq? (car spec) 'help-labels)
null]
[(eq? (car spec) 'ps)
null]
[(eq? (car spec) 'multi)
(map
(lambda (line) (cons #f line))