zsh-workers
 help / color / mirror / code / Atom feed
de3420038badc9fe6e02fb72e33652645819bcd2 blob 1231 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
# Tests for interactive job control with parameter state

%prep

  if zmodload zsh/zpty 2> /dev/null; then
    zpty_start() {
      export PS1= PS2=
      zpty -d
      zpty zsh "${(q)ZTST_testdir}/../Src/zsh -fiV +Z"
    }
    zpty_input() {
      zpty -w zsh "${(F)@}" $'\n'
    }
    zpty_line() {
      local REPLY
      integer i
      for (( i = 0; i < ${1:-1}; ++i )); do
        zpty -r zsh REPLY
        print -r -- ${REPLY%%($'\r\n'|$'\n')}
      done
    }
    zpty_stop() {
      # exit twice in case of check_jobs
      zpty -w zsh $'exit\nexit\n'
      # zpty gives no output when piped without these braces (?)
      { zpty -r zsh } | sed $'/[^[:space:]]/!d; s/\r$//;'
      zpty -d
      :
    }
    if ! zmodload zsh/parameter 2> /dev/null; then
      ZTST_unimplemented='the zsh/parameter module is not available'
    fi
  else
    ZTST_unimplemented='the zsh/zpty module is not available'
  fi

%test

  zpty_start
  zpty_input "MODULE_PATH=$MODULE_PATH"
  zpty_input 'sleep 3 &'
  zpty_input 'print $jobstates'
  zpty_input '(print $jobstates)'
  zpty_input 'jobs -s'
  zpty_stop
0:$jobstate for running job in main shell and subshell
*>\[1] [0-9]##
*>running:+:*=running
*>running:+:*=running
*>zsh:*SIGHUPed*
debug log:

solving de3420038 ...
found de3420038 in https://inbox.vuxu.org/zsh-workers/59C35A96-D41D-4EF7-A02B-94B70AE1122D@kba.biglobe.ne.jp/
found 474adfaec in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 474adfaec1d539f0a7e31086f857218b92aa78ad	Test/W03jobparameters.ztst

applying [1/1] https://inbox.vuxu.org/zsh-workers/59C35A96-D41D-4EF7-A02B-94B70AE1122D@kba.biglobe.ne.jp/
diff --git a/Test/W03jobparameters.ztst b/Test/W03jobparameters.ztst
index 474adfaec..de3420038 100644

Checking patch Test/W03jobparameters.ztst...
Applied patch Test/W03jobparameters.ztst cleanly.

index at:
100644 de3420038badc9fe6e02fb72e33652645819bcd2	Test/W03jobparameters.ztst

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).