(CommandList children: [ (FuncDef name: test_terminal body: (BraceGroup children: [ (If arms: [ (if_arm cond: [(Pipeline children:[(C {(test_declared_prereq)} {(TTY)})] negated:True)] action: [ (SimpleCommand words: [{(echo)} {(DQ ('test_terminal: need to declare TTY prerequisite'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(4)} spids:[35])] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(127)} ) ] spids: [16777215 30] ) ] spids: [16777215 48] ) (C {(perl)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/test-terminal.perl)} {(DQ ($ VSub_At '$@'))} ) ] spids: [18] ) spids: [13 17] ) (C {(test_lazy_prereq)} {(TTY)} { (SQ <'\n'> <'\ttest_have_prereq PERL &&\n'> <'\n'> <'\t# Reading from the pty master seems to get stuck _sometimes_\n'> <'\t# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.\n'> <'\t#\n'> <'\t# Reproduction recipe: run\n'> <'\t#\n'> <'\t#\ti=0\n'> <'\t#\twhile ./test-terminal.perl echo hi $i\n'> <'\t#\tdo\n'> <'\t#\t\t: $((i = $i + 1))\n'> <'\t#\tdone\n'> <'\t#\n'> <'\t# After 2000 iterations or so it hangs.\n'> <'\t# https://rt.cpan.org/Ticket/Display.html?id=65692\n'> <'\t#\n'> <'\ttest "$(uname -s)" != Darwin &&\n'> <'\n'> <'\tperl "$TEST_DIRECTORY"/test-terminal.perl \\\n'> <'\t\tsh -c "test -t 1 && test -t 2"\n'> ) } ) ] )