Opened 4 years ago

#1701 new defect

Egg SRFI-37 - wrong result

Reported by: Jeronimo Pellegrini Owned by:
Priority: minor Milestone: someday
Component: extensions Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

Egg srfi-37 seems to have a problem:

Type ,? for help.
#;1> (import (srfi 37))
; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-git/11/srfi-37.import.so ...
; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-git/11/srfi-37.so ...
#;2> (args-fold '("-I" "the-argument")
           (list (option '(#\I) #f #t
                         (lambda (opt name arg result)
                           (and (eqv? name #\I) arg))))
           (lambda args (error "unrecognized"))
           (lambda args #f)
           #f)
#f
#;4>

But it should have returned the argument value ("the-argument").

If, instead of '("-I" "the-argument"), you pass it '("-Ithe-argument"),
then it will correctly recognize -I's argument, "the-argument".

Several implementations seem to do the same, so perhaps this is a bug in
the reference implementation?

Change History (0)

Note: See TracTickets for help on using tickets.