]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/history.right
Bash-5.2-rc4 release
[thirdparty/bash.git] / tests / history.right
1 ./history.tests: line 17: history: -x: invalid option
2 history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
3 ./history.tests: line 19: history: cannot use more than one of -anrw
4 ./history.tests: line 22: fc: -v: invalid option
5 fc: usage: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
6 1 for i in one two three; do echo $i; done
7 2 /bin/sh -c 'echo this is $0'
8 3 ls
9 4 echo $BASH_VERSION
10 1 for i in one two three; do echo $i; done
11 2 /bin/sh -c 'echo this is $0'
12 3 ls
13 4 echo $BASH_VERSION
14 for i in one two three; do echo $i; done
15 /bin/sh -c 'echo this is $0'
16 ls
17 echo $BASH_VERSION
18 4 echo $BASH_VERSION
19 3 ls
20 2 /bin/sh -c 'echo this is $0'
21 1 for i in one two three; do echo $i; done
22 echo $BASH_VERSION
23 ls
24 /bin/sh -c 'echo this is $0'
25 for i in one two three; do echo $i; done
26 1 for i in one two three; do echo $i; done
27 2 /bin/sh -c 'echo this is $0'
28 3 ls
29 4 echo $BASH_VERSION
30 5 echo line for history
31 echo line for history
32 for i in one two three; do echo $i; done
33 /bin/sh -c 'echo this is $0'
34 ls
35 echo $BASH_VERSION
36 echo line for history
37 displaying $HISTFILE after history -a
38 echo line for history
39 HISTFILE=$TMPDIR/newhistory
40 1 for i in one two three; do echo $i; done
41 2 /bin/sh -c 'echo this is $0'
42 3 ls
43 4 echo $BASH_VERSION
44 5 echo line for history
45 6 HISTFILE=$TMPDIR/newhistory
46 7 echo displaying \$HISTFILE after history -a
47 8 cat $HISTFILE
48 for i in one two three; do echo $i; done
49 /bin/sh -c 'echo this is $0'
50 ls
51 echo $BASH_VERSION
52 echo line for history
53 HISTFILE=$TMPDIR/newhistory
54 echo displaying \$HISTFILE after history -a
55 cat $HISTFILE
56 1 for i in one two three; do echo $i; done
57 2 /bin/sh -c 'echo this is $0'
58 3 ls
59 4 echo $BASH_VERSION
60 5 echo line for history
61 6 HISTFILE=$TMPDIR/newhistory
62 7 echo displaying \$HISTFILE after history -a
63 8 cat $HISTFILE
64 9 echo line 2 for history
65 echo line 2 for history
66 echo line 2 for history
67 1 for i in one two three; do echo $i; done
68 2 /bin/sh -c 'echo this is $0'
69 3 ls
70 4 echo $BASH_VERSION
71 5 echo line for history
72 6 HISTFILE=$TMPDIR/newhistory
73 7 echo displaying \$HISTFILE after history -a
74 8 cat $HISTFILE
75 9 echo line 2 for history
76 10 # this should show up as one history entry
77 11 for x in one two three; do :; done
78 set -H
79 echo line 2 for history
80 line 2 for history
81 4 echo $BASH_VERSION
82 5 echo line for history
83 6 HISTFILE=$TMPDIR/newhistory
84 7 echo displaying \$HISTFILE after history -a
85 8 cat $HISTFILE
86 9 echo line 2 for history
87 10 # this should show up as one history entry
88 11 for x in one two three; do :; done
89 12 # just a basic test. a full test suite for history expansion should be
90 13 # created
91 14 set -H
92 15 echo line 2 for history
93 16 unset HISTSIZE
94 17 unset HISTFILE
95 4 echo $BASH_VERSION
96 5 echo line for history
97 6 HISTFILE=$TMPDIR/newhistory
98 7 echo displaying \$HISTFILE after history -a
99 8 cat $HISTFILE
100 ./history.tests: line 90: fc: no command found
101 15 echo line 2 for history
102 16 unset HISTSIZE
103 17 unset HISTFILE
104 18 # now an out-of-range error because of the one=two not found in history
105 aa ab ac
106 echo xx xb xc
107 xx xb xc
108 echo 44 48 4c
109 44 48 4c
110 ./history.tests: line 105: fc: no command found
111 aa
112 bb
113 cc
114 echo cc
115 echo cc
116 cc
117 aa
118 bb
119 cc
120 echo cc
121 echo cc
122 cc
123 1
124 one
125 two
126 three
127 1 cat <<!
128 one
129 two
130 three
131 !
132
133 2 history
134 cat <<!
135 one
136 two
137 three
138 !
139
140 one
141 two
142 three
143 5.2
144 echo ${BASH_VERSION%\.*}
145 5.2
146 echo ${BASH_VERSION%\.*}
147 a
148 b
149 c
150 d
151 e
152 1 echo a
153 2 echo b
154 3 echo c
155 4 echo d
156 5 echo e
157
158 1 echo a
159 2 echo e
160 f
161 g
162 h
163 i
164 1 echo a
165 2 echo e
166 3 echo f
167 4 echo g
168 5 echo h
169
170 ./history3.sub: line 40: history: 16: history position out of range
171 ./history3.sub: line 41: history: 200: history position out of range
172 ./history3.sub: line 42: history: -20: history position out of range
173 ./history3.sub: line 43: history: -50: history position out of range
174 ./history3.sub: line 44: history: 5-0xaf: history position out of range
175 1 echo a
176 2 echo e
177 3 echo f
178 4 echo g
179 5 echo h
180
181
182 0
183 1
184 2
185 (left
186 mid
187 right)
188 A
189 B
190
191 (left
192 mid
193 right)
194 A
195 B
196
197 (left
198 mid
199 right)
200 A
201 B
202
203 0
204 1
205 2
206 (left
207 mid
208 right)
209 A
210 B
211 (left
212 mid
213 right)
214 A
215 B
216
217 0
218 1
219 2
220 (left
221 mid
222 right)
223 A
224 B
225 (left
226 mid
227 right)
228 A
229 B
230 a
231 b
232 ./history5.sub: line 24: fc: history specification out of range
233 ./history5.sub: line 25: fc: no command found
234 1 echo a
235 2 echo b
236 3 fc -0 # error
237 4 fc -s -0 # error
238 c
239 6 echo c
240 8 fc -l -0
241 d
242 echo d
243 d
244 a
245 b
246 c
247 d
248 e
249 f
250 4 echo d
251 5 echo e
252 6 echo f
253 out of range 1
254 6 echo f
255 7 fc -l
256 8 echo out of range 1
257 out of range 2
258 8 echo out of range 1
259 9 fc -l 502 498
260 10 echo out of range 2
261 out of range 3
262 10 echo out of range 2
263 11 fc -l 498 502
264 12 echo out of range 3
265 out of range 4
266 13 fc -l 1 99
267 1
268 2
269 3
270 4
271 5
272 6
273 3 echo 3
274 4 echo 4
275 5 echo 5
276 6 echo 6
277 3 echo 3
278 4 echo 4
279 5 echo 5
280 6
281 7
282 4 echo 4
283 5 echo 5
284 6 echo 6
285 7 echo 7
286 4 echo 4
287 5 echo 5
288 6 echo 6
289 7
290 8
291 5 echo 5
292 6 echo 6
293 9
294 10
295 5 echo 5
296 6 echo 6
297 7 echo 9
298 8 echo 10
299 5 echo 10