1# zpty is required by tests of interactive modes of the shell itself.
2# This tests some extra things.
3
4%prep
5
6  if ! zmodload zsh/zpty 2>/dev/null
7  then
8    ZTST_unimplemented="the zsh/zpty module is not available"
9    return 0
10  fi
11
12%test
13
14  zpty cat cat
15  zpty -w cat a line of text
16  var=
17  zpty -r cat var && print -r -- ${var%%$'\r\n'}
18  zpty -d cat
190:zpty with a process that does not set up the terminal: internal write
20>a line of text
21
22  zpty cat cat
23  print a line of text | zpty -w cat
24  var=
25  zpty -r cat var && print -r -- ${var%%$'\r\n'}
26  zpty -d cat
270:zpty with a process that does not set up the terminal: write via stdin
28>a line of text
29