1 # Check stdout redirect (> and >>).
3 # RUN: echo "not-present" > %t.stdout-write
4 # RUN: echo "is-present" > %t.stdout-write
5 # RUN: FileCheck --check-prefix=STDOUT-WRITE < %t.stdout-write %s
7 # STDOUT-WRITE-NOT: not-present
8 # STDOUT-WRITE: is-present
10 # RUN: echo "appended-line" >> %t.stdout-write
11 # RUN: FileCheck --check-prefix=STDOUT-APPEND < %t.stdout-write %s
13 # STDOUT-APPEND: is-present
14 # STDOUT-APPEND: appended-line
17 # Check stderr redirect (2> and 2>>).
19 # RUN: echo "not-present" > %t.stderr-write
20 # RUN: %S/write-to-stderr.sh 2> %t.stderr-write
21 # RUN: FileCheck --check-prefix=STDERR-WRITE < %t.stderr-write %s
23 # STDERR-WRITE-NOT: not-present
24 # STDERR-WRITE: a line on stderr
26 # RUN: %S/write-to-stderr.sh 2>> %t.stderr-write
27 # RUN: FileCheck --check-prefix=STDERR-APPEND < %t.stderr-write %s
29 # STDERR-APPEND: a line on stderr
30 # STDERR-APPEND: a line on stderr
33 # Check combined redirect (&>).
35 # RUN: echo "not-present" > %t.combined
36 # RUN: %S/write-to-stdout-and-stderr.sh &> %t.combined
37 # RUN: FileCheck --check-prefix=COMBINED-WRITE < %t.combined %s
39 # COMBINED-WRITE-NOT: not-present
40 # COMBINED-WRITE: a line on stdout
41 # COMBINED-WRITE: a line on stderr