#49 glob pattern matching doesn't work for character range

closed-fixed
None
5
2008-06-03
2008-01-17
Anonymous
No

exp_internal 1
spawn sh -c "echo a && cat"
expect {[a]} {puts ok}

Gives :

expect: does "a\r\n" (spawn_id exp6) match glob pattern "[a]"? no
expect: timed out

I activated EXP_INTERNAL_TRACE_GLOB (tracing flag in
exp_glob.c) and it says :

expect: does "a\r\n" (spawn_id exp4) match glob pattern "[a]"?
ESCM pattern(3)="[a]"
string(3)="a\r\n"
nocase=0
ESCM2 pattern="[a]"
string="a\r\n"
nocase=0
* pattern="[a]"
* string="a\r\n"
* pattern="]"
* string="\r\n"
@0 => -1

Discussion

    • assigned_to: nobody --> andreas_kupries
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=75003
    Originator: NO

    Fixed with version Expect 5.44.1.9.