Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

raw_pty of Expect.pm / IO::Pty not working properly on OSX?

by szabgab (Priest)
on Jul 27, 2014 at 15:02 UTC ( #1095239=perlquestion: print w/replies, xml ) Need Help??

szabgab has asked for the wisdom of the Perl Monks concerning the following question:

I was just testing one of my code examples for Expect.pm that works on Linux (perl 5.18.1 and 5.20.0) but apparently does not work on OSX (5.20.0) . I wrote a test case and added it to https://github.com/szabgab/expect.pm/blob/master/t/02-bc.t.

Any idea why this does not work on OSX? Am I doing it wrong or is this a bug in IO::Pty? Could anyone with OSX test this?

  • Comment on raw_pty of Expect.pm / IO::Pty not working properly on OSX?

Replies are listed 'Best First'.
Re: raw_pty of Expect.pm / IO::Pty not working properly on OSX?
by kevbot (Priest) on Jul 27, 2014 at 20:19 UTC

    Hello,

    On Mac OS X 10.9.4 (Mavericks), with the following setup:
    • perlbrew perl 5.18.1, (compiled with -Dusethreads)
    • Expect v1.21
    • IO::Tty, v1.10
    • IO::Pty, v1.10
    • bc, v1.06
    I get this output:
    1..1 1..1 bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 23+7 not ok 1 # Failed test at 02-bc.t line 26. # got: '23' # expected: '30' # Looks like you failed 1 test of 1. not ok 1 - raw_pty_bc # Failed test 'raw_pty_bc' # at 02-bc.t line 28. # Looks like you failed 1 test of 1.
    On Ubuntu 12.04, with the following setup:
    • perlbrew perl 5.16.2, (compiled with -Dusethreads)
    • Expect v1.21
    • IO::Tty, v1.11
    • IO::Pty, v1.11
    • bc, v1.06.95
    I get this output:
    1..1 1..1 bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Founda +tion, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 30 ok 1 ok 1 - raw_pty_bc
    So, I upgraded IO::Tty and IO::Pty on my Mac to v1.11 and tried again. I got the same test failure:
    ..1 1..1 bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 23+7 not ok 1 # Failed test at 02-bc.t line 26. # got: '23' # expected: '30' # Looks like you failed 1 test of 1. not ok 1 - raw_pty_bc # Failed test 'raw_pty_bc' # at 02-bc.t line 28. # Looks like you failed 1 test of 1.
      thanks for confirming in other setups too!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1095239]
Approved by no_slogan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2020-05-29 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (167 votes). Check out past polls.

    Notices?