34
34
(test nil (match-unique-abbreviation "ab" '("ab" "abc")))
35
35
(test 1 (match-unique-abbreviation "ac" '("ab" "ac")))
36
36
(test 1 (match-unique-abbreviation "ac" '("ab" "acb")))
39
39
(test-mv '(("argv") nil nil) (getopt '("argv") nil))
40
40
(test-mv '(("argv" "2") nil nil) (getopt '("argv" "2") nil))
42
42
(test-mv '(("argv") (("c")) nil) (getopt '("argv" "-c") '(("c" :none))))
44
(test-mv '(("argv") (("c" . "val")) nil)
45
(getopt '("argv" "-c" "val") '(("c" :optional))))
46
(test-mv '(("argv" "v1") (("c" . "val")) nil)
47
(getopt '("argv" "-c" "val" "v1") '(("c" :optional))))
48
(test-mv '(( "v1") (("colon" . "val")) nil)
49
(getopt '("--colon" "val" "v1") '(("colon" :optional))))
50
(test-mv '(("ab" "-c") (("colon" . "val")) nil)
51
(getopt '("ab" "--colon" "val" "--" "-c")
52
'(("colon" :optional) ("-c" :none))))
53
(test-mv '(("argv") (("c" . "cd")) nil)
54
(getopt '("argv" "-c" "cd") '(("c" :required))))
55
(test-mv '(("argv") nil ("c"))
56
(getopt '("argv" "-c") '(("c" :required))))
57
(test-mv '(("argv") (("c" . "10")) nil)
58
(getopt '("argv" "-c=10") '(("c" :required))))
59
(test-mv '(("argv") nil ("c"))
60
(getopt '("argv" "-c=10") '(("c" :none))))
61
(test-mv '(nil (("along" . "10")) nil)
62
(getopt '("--along=10") '(("along" :optional))))
63
(test-mv '(nil nil ("along"))
64
(getopt '("--along=10") '(("along" :none))))
65
(test-mv '(nil (("along" . "10")) nil)
66
(getopt '("--a=10") '(("along" :optional))))
44
(test-mv '(("argv") (("c" . "val")) nil)
45
(getopt '("argv" "-c" "val") '(("c" :optional))))
46
(test-mv '(("argv" "v1") (("c" . "val")) nil)
47
(getopt '("argv" "-c" "val" "v1") '(("c" :optional))))
48
(test-mv '(( "v1") (("colon" . "val")) nil)
49
(getopt '("--colon" "val" "v1") '(("colon" :optional))))
50
(test-mv '(("ab" "-c") (("colon" . "val")) nil)
51
(getopt '("ab" "--colon" "val" "--" "-c")
52
'(("colon" :optional) ("-c" :none))))
53
(test-mv '(("argv") (("c" . "cd")) nil)
54
(getopt '("argv" "-c" "cd") '(("c" :required))))
55
(test-mv '(("argv") nil ("c"))
56
(getopt '("argv" "-c") '(("c" :required))))
57
(test-mv '(("argv") (("c" . "10")) nil)
58
(getopt '("argv" "-c=10") '(("c" :required))))
59
(test-mv '(("argv") nil ("c"))
60
(getopt '("argv" "-c=10") '(("c" :none))))
61
(test-mv '(nil (("along" . "10")) nil)
62
(getopt '("--along=10") '(("along" :optional))))
63
(test-mv '(nil nil ("along"))
64
(getopt '("--along=10") '(("along" :none))))
65
(test-mv '(nil (("along" . "10")) nil)
66
(getopt '("--a=10") '(("along" :optional))))
67
67
(test-mv '(nil nil ("a"))
68
(getopt '("--a=10") '(("along" :optional) ("aboot" :optional))))
68
(getopt '("--a=10") '(("along" :optional) ("aboot" :optional))))
69
69
(test-mv '(("a") nil nil)
70
70
(getopt '("a") '(("a" :none))))
71
(test-mv '(("a") (("foo") ("bar")) nil)
72
(getopt '("a" "--foo" "--bar") '(("foo" :none) ("bar" :none))))
73
(test-mv '(("a") (("foo") ("bar")) nil)
74
(getopt '("a" "--f" "--bar") '(("foo" :none) ("bar" :none))))