|
2 | 2 | # Check force remove commands success whether the file does or doesn't exist. |
3 | 3 | # |
4 | 4 | # RUN: rm -f %t.write |
5 | | -# RUN: %{python} %S/check_path.py file %t.write > %t.out |
| 5 | +# RUN: %{python} %S/../check_path.py file %t.write > %t.out |
6 | 6 | # RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s |
7 | 7 | # RUN: echo "create a temp file" > %t.write |
8 | | -# RUN: %{python} %S/check_path.py file %t.write > %t.out |
| 8 | +# RUN: %{python} %S/../check_path.py file %t.write > %t.out |
9 | 9 | # RUN: FileCheck --check-prefix=FILE-EXIST < %t.out %s |
10 | 10 | # RUN: rm -f %t.write |
11 | | -# RUN: %{python} %S/check_path.py file %t.write > %t.out |
| 11 | +# RUN: %{python} %S/../check_path.py file %t.write > %t.out |
12 | 12 | # RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s |
13 | 13 | # |
14 | 14 | # REMOVE-FILE: False |
|
19 | 19 | # |
20 | 20 | # Check the mkdir command with -p option. |
21 | 21 | # RUN: rm -f -r %T/test |
22 | | -# RUN: %{python} %S/check_path.py dir %T/test > %t.out |
| 22 | +# RUN: %{python} %S/../check_path.py dir %T/test > %t.out |
23 | 23 | # RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s |
24 | 24 | # RUN: mkdir -p %T/test |
25 | | -# RUN: %{python} %S/check_path.py dir %T/test > %t.out |
| 25 | +# RUN: %{python} %S/../check_path.py dir %T/test > %t.out |
26 | 26 | # RUN: FileCheck --check-prefix=MAKE-PARENT-DIR < %t.out %s |
27 | 27 | # RUN: rm -f %T/test || true |
28 | 28 | # RUN: rm -f -r %T/test |
29 | | -# RUN: %{python} %S/check_path.py dir %T/test > %t.out |
| 29 | +# RUN: %{python} %S/../check_path.py dir %T/test > %t.out |
30 | 30 | # RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s |
31 | 31 | # |
32 | 32 | # MAKE-PARENT-DIR: True |
|
36 | 36 | # |
37 | 37 | # RUN: rm -rf %T/test1 |
38 | 38 | # RUN: mkdir %T/test1 |
39 | | -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out |
| 39 | +# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out |
40 | 40 | # RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s |
41 | 41 | # RUN: cd %T/test1 && mkdir foo |
42 | | -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out |
| 42 | +# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out |
43 | 43 | # RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s |
44 | 44 | # RUN: cd %T && rm -rf %T/test1 |
45 | | -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out |
| 45 | +# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out |
46 | 46 | # RUN: FileCheck --check-prefix=REMOVE-DIR < %t.out %s |
47 | 47 | # |
48 | 48 | # MAKE-DIR: True |
|
52 | 52 | # |
53 | 53 | # RUN: rm -rf %T/test |
54 | 54 | # RUN: mkdir -p %T/test/test1 %T/test/test2 |
55 | | -# RUN: %{python} %S/check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out |
| 55 | +# RUN: %{python} %S/../check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out |
56 | 56 | # RUN: FileCheck --check-prefix=DIRS-EXIST < %t.out %s |
57 | 57 | # RUN: mkdir %T/test || true |
58 | 58 | # RUN: echo "create a temp file" > %T/test/temp.write |
59 | 59 | # RUN: echo "create a temp1 file" > %T/test/test1/temp1.write |
60 | 60 | # RUN: echo "create a temp2 file" > %T/test/test2/temp2.write |
61 | | -# RUN: %{python} %S/check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out |
| 61 | +# RUN: %{python} %S/../check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out |
62 | 62 | # RUN: FileCheck --check-prefix=FILES-EXIST < %t.out %s |
63 | 63 | # RUN: rm -r -f %T/* |
64 | | -# RUN: %{python} %S/check_path.py dir %T/test > %t.out |
| 64 | +# RUN: %{python} %S/../check_path.py dir %T/test > %t.out |
65 | 65 | # RUN: FileCheck --check-prefix=REMOVE-ALL < %t.out %s |
66 | 66 | # |
67 | 67 | # DIRS-EXIST: True |
|
85 | 85 | # RUN: cd %T/dir1 && echo "hello" > temp1.txt |
86 | 86 | # RUN: cd %T/dir2 && echo "hello" > temp2.txt |
87 | 87 | # RUN: diff temp2.txt ../dir1/temp1.txt |
88 | | -# |
89 | | -# Check cat command with single file. |
90 | | -# |
91 | | -# RUN: rm -rf %T/testCat |
92 | | -# RUN: mkdir -p %T/testCat |
93 | | -# RUN: echo "abcdefgh" > %T/testCat/temp.write |
94 | | -# RUN: cat %T/testCat/temp.write > %T/testCat/tempcat.write |
95 | | -# RUN: %{python} %S/check_path.py file %T/testCat/tempcat.write > %T/testCat/path.out |
96 | | -# RUN: FileCheck --check-prefix=FILE-EXISTS < %T/testCat/path.out %s |
97 | | -# RUN: FileCheck --check-prefix=CAT-OUTPUT < %T/testCat/tempcat.write %s |
98 | | -# FILE-EXISTS: True |
99 | | -# CAT-OUTPUT: abcdefgh |
100 | | -# |
101 | | -# Check cat command with multiple files. |
102 | | -# |
103 | | -# RUN: rm -rf %T/testCat |
104 | | -# RUN: mkdir -p %T/testCat |
105 | | -# RUN: echo "abcdefgh" > %T/testCat/temp1.write |
106 | | -# RUN: echo "efghijkl" > %T/testCat/temp2.write |
107 | | -# RUN: echo "mnopqrst" > %T/testCat/temp3.write |
108 | | -# RUN: cat %T/testCat/temp1.write %T/testCat/temp2.write %T/testCat/temp3.write > %T/testCat/tempmulticat.write |
109 | | -# RUN: %{python} %S/check_path.py file %T/testCat/tempmulticat.write > %T/testCat/path.out |
110 | | -# RUN: FileCheck --check-prefix=MULTI-FILE-EXISTS < %T/testCat/path.out %s |
111 | | -# RUN: FileCheck --check-prefix=MULTI-CAT-OUTPUT < %T/testCat/tempmulticat.write %s |
112 | | -# MULTI-FILE-EXISTS: True |
113 | | -# MULTI-CAT-OUTPUT: abcdefgh |
114 | | -# MULTI-CAT-OUTPUT-NEXT: efghijkl |
115 | | -# MULTI-CAT-OUTPUT-NEXT: mnopqrst |
116 | | -# |
117 | | -# Check cat command with multiple files and piped output to FileCheck. |
118 | | -# |
119 | | -# RUN: rm -rf %T/testCat |
120 | | -# RUN: mkdir -p %T/testCat |
121 | | -# RUN: echo "abcdefgh" > %T/testCat/temp1.write |
122 | | -# RUN: echo "efghijkl" > %T/testCat/temp2.write |
123 | | -# RUN: cat %T/testCat/temp1.write %T/testCat/temp2.write | FileCheck --check-prefix=PIPED-CAT-OUTPUT %s |
124 | | -# PIPED-CAT-OUTPUT: abcdefgh |
125 | | -# PIPED-CAT-OUTPUT-NEXT: efghijkl |
126 | | -# |
127 | | -# Check cat command with multiple files and glob expressions. |
128 | | -# |
129 | | -# RUN: rm -rf %T/testCat |
130 | | -# RUN: mkdir -p %T/testCat |
131 | | -# RUN: echo "cvbnm" > %T/testCat/temp1.write |
132 | | -# RUN: echo "qwerty" > %T/testCat/temp2.write |
133 | | -# RUN: cat %T/testCat/*.write | FileCheck --check-prefix=GLOB-CAT-OUTPUT %s |
134 | | -# GLOB-CAT-OUTPUT: cvbnm |
135 | | -# GLOB-CAT-OUTPUT-NEXT: qwerty |
136 | | -# |
137 | | -# Check cat command with -v option |
138 | | -# |
139 | | -# RUN: cat -v %S/cat_nonprinting.bin | FileCheck --check-prefix=NP-CAT-OUTPUT %s |
140 | | -# NP-CAT-OUTPUT: ^@^A^B^C^D^E^F^G ^H |
141 | | -# NP-CAT-OUTPUT-NEXT: ^K^L^M^N^O^P^Q^R^S |
142 | | -# NP-CAT-OUTPUT-NEXT: ^T^U^V^W^X^Y^Z^[^\^]^^^_ !"#$%&' |
143 | | -# NP-CAT-OUTPUT-NEXT: ()*+,-./0123456789:; |
144 | | -# NP-CAT-OUTPUT-NEXT: <=>?@ABCDEFGHIJKLMNO |
145 | | -# NP-CAT-OUTPUT-NEXT: PQRSTUVWXYZ[\]^_`abc |
146 | | -# NP-CAT-OUTPUT-NEXT: defghijklmnopqrstuvw |
147 | | -# NP-CAT-OUTPUT-NEXT: xyz{|}~^?M-^@M-^AM-^BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^K |
148 | | -# NP-CAT-OUTPUT-NEXT: M-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^VM-^WM-^XM-^YM-^ZM-^[M-^\M-^]M-^^M-^_ |
149 | | -# NP-CAT-OUTPUT-NEXT: M- M-!M-"M-#M-$M-%M-&M-'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3 |
150 | | -# NP-CAT-OUTPUT-NEXT: M-4M-5M-6M-7M-8M-9M-:M-;M-<M-=M->M-?M-@M-AM-BM-CM-DM-EM-FM-G |
151 | | -# NP-CAT-OUTPUT-NEXT: M-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-UM-VM-WM-XM-YM-ZM-[ |
152 | | -# NP-CAT-OUTPUT-NEXT: M-\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-o |
153 | | -# NP-CAT-OUTPUT-NEXT: M-pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^? |
154 | | -# |
155 | | -# Check cat command with -show-nonprinting option |
156 | | -# |
157 | | -# RUN: cat --show-nonprinting %S/cat_nonprinting.bin | FileCheck --check-prefix=NPLONG-CAT-OUTPUT %s |
158 | | -# NPLONG-CAT-OUTPUT: ^@^A^B^C^D^E^F^G ^H |
159 | | -# NPLONG-CAT-OUTPUT-NEXT: ^K^L^M^N^O^P^Q^R^S |
160 | | -# NPLONG-CAT-OUTPUT-NEXT: ^T^U^V^W^X^Y^Z^[^\^]^^^_ !"#$%&' |
161 | | -# NPLONG-CAT-OUTPUT-NEXT: ()*+,-./0123456789:; |
162 | | -# NPLONG-CAT-OUTPUT-NEXT: <=>?@ABCDEFGHIJKLMNO |
163 | | -# NPLONG-CAT-OUTPUT-NEXT: PQRSTUVWXYZ[\]^_`abc |
164 | | -# NPLONG-CAT-OUTPUT-NEXT: defghijklmnopqrstuvw |
165 | | -# NPLONG-CAT-OUTPUT-NEXT: xyz{|}~^?M-^@M-^AM-^BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^K |
166 | | -# NPLONG-CAT-OUTPUT-NEXT: M-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^VM-^WM-^XM-^YM-^ZM-^[M-^\M-^]M-^^M-^_ |
167 | | -# NPLONG-CAT-OUTPUT-NEXT: M- M-!M-"M-#M-$M-%M-&M-'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3 |
168 | | -# NPLONG-CAT-OUTPUT-NEXT: M-4M-5M-6M-7M-8M-9M-:M-;M-<M-=M->M-?M-@M-AM-BM-CM-DM-EM-FM-G |
169 | | -# NPLONG-CAT-OUTPUT-NEXT: M-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-UM-VM-WM-XM-YM-ZM-[ |
170 | | -# NPLONG-CAT-OUTPUT-NEXT: M-\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-o |
171 | | -# NPLONG-CAT-OUTPUT-NEXT: M-pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^? |
0 commit comments