about summary refs log tree commit diff
path: root/Misc/job-control-tests
blob: 7e35fba0b8d73a2ac91d632837d3ef9cced358a1 (plain) (blame)
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
# These are some tests for the job control code.  The code chunks
# have to be run interactively.  Some use files in the zsh distribution.

# Try
#   ^Z
#   fg
if true; then cat Src/builtin.c | less; fi

# Try
#   ^Z
#   fg
fn() {
  if true; then cat Src/builtin.c | less; fi
}
fn

# Try
#   ^Z
#   fg
#   ^C
# then
#   ^Z
#   bg
#   kill
while true; do sed -e 's/foo/bar/' Src/builtin.c >/dev/null; done

# Try
#   ^C
# ignoring the error messages from sed.
# ^Z is more of a problem since you have to catch the sed.
while true; do sed -e 's/foo/bar/' non-existent-file >/dev/null; done