author | Jan Vrany <jan.vrany@labware.com> |
Thu, 01 Jul 2021 16:09:20 +0100 | |
branch | jv |
changeset 2602 | 1e701f1808a7 |
parent 1974 | f2eaf05205d6 |
permissions | -rwxr-xr-x |
1974 | 1 |
" |
2 |
COPYRIGHT (c) Claus Gittinger / eXept Software AG |
|
3 |
COPYRIGHT (c) 2015-2017 Jan Vrany |
|
4 |
All Rights Reserved |
|
5 |
||
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
1499
26a16a04219b
Package renamed from exept:regression to stx:goodies/regression. Hooray!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1478
diff
changeset
|
13 |
"{ Package: 'stx:goodies/regression' }" |
1289
e1b9697a5b5e
class: RegressionTests::PipeStreamTest
Stefan Vogel <sv@exept.de>
parents:
1215
diff
changeset
|
14 |
|
121 | 15 |
"{ NameSpace: RegressionTests }" |
16 |
||
17 |
TestCase subclass:#PipeStreamTest |
|
18 |
instanceVariableNames:'' |
|
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
1082 | 21 |
category:'tests-Regression-Streams' |
121 | 22 |
! |
23 |
||
1974 | 24 |
!PipeStreamTest class methodsFor:'documentation'! |
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) Claus Gittinger / eXept Software AG |
|
29 |
COPYRIGHT (c) 2015-2017 Jan Vrany |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! ! |
|
121 | 40 |
|
41 |
!PipeStreamTest methodsFor:'tests'! |
|
42 |
||
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
43 |
testPipeWriteRead |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
44 |
| makeReader makeWriter count threads ok blocker | |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
45 |
|
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
46 |
count := 1000. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
47 |
threads := 200. |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
48 |
|
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
49 |
(OperatingSystem isMSWINDOWSlike) ifTrue:[ |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
50 |
"/ Sigh, when having too much threads on Windows, |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
51 |
"/ this test lead to deadlock. This has to be investigated |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
52 |
"/ and fixed. See |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
53 |
"/ |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
54 |
"/ https://swing.fit.cvut.cz/projects/stx-jv/ticket/104 |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
55 |
threads := 20. |
1110
a38d8f5208fd
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1109
diff
changeset
|
56 |
]. |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
57 |
ok := true. |
1289
e1b9697a5b5e
class: RegressionTests::PipeStreamTest
Stefan Vogel <sv@exept.de>
parents:
1215
diff
changeset
|
58 |
blocker := Semaphore new: 2 - threads. |
e1b9697a5b5e
class: RegressionTests::PipeStreamTest
Stefan Vogel <sv@exept.de>
parents:
1215
diff
changeset
|
59 |
|
1447 | 60 |
makeReader := [ :stream | |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
61 |
[ |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
62 |
| c | |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
63 |
c := 0. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
64 |
[ stream atEnd ] whileFalse:[ |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
65 |
stream next. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
66 |
c := c + 1. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
67 |
]. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
68 |
ok := ok and:[ count == c ]. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
69 |
blocker signal. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
70 |
]. |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
71 |
]. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
72 |
|
1447 | 73 |
makeWriter := [ :stream | |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
74 |
[ |
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
75 |
[ count timesRepeat:[stream nextPut: $P] ] on: Error do:[ :ex | |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
76 |
Transcript showCR: 'ERROR in writer: ', ex description. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
77 |
ex suspendedContext fullPrintOn: Transcript. |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
78 |
ok := false |
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
79 |
] ensure:[ |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
80 |
stream close. |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
81 |
] |
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
82 |
] |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
83 |
]. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
84 |
|
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
85 |
2 to: threads do:[:i | |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
86 |
| pipe rs rp ws wp | |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
87 |
|
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
88 |
pipe := NonPositionableExternalStream makePipe. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
89 |
rs := pipe at:1. |
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
90 |
ws := pipe at:2. |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
91 |
|
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
92 |
rp := (makeReader value: rs) newProcess. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
93 |
rp name: i printString , ' R ' , testSelector. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
94 |
wp := (makeWriter value: ws) newProcess. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
95 |
wp name: i printString , ' W ' , testSelector. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
96 |
rp resume. |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
97 |
wp resume. |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
98 |
]. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
99 |
|
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
100 |
blocker wait. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
101 |
self assert: ok. |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
102 |
|
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
103 |
"Created: / 27-03-2014 / 16:21:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
104 |
"Modified: / 28-12-2015 / 13:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1532
c540e1f444ea
Issue #104: Temporarily lower the number of threads in #testPipeReadWrite
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1500
diff
changeset
|
105 |
"Modified: / 04-09-2016 / 03:23:36 / jv" |
1109
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
106 |
! |
ad8866ade273
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1082
diff
changeset
|
107 |
|
121 | 108 |
testReadCheckPipe4 |
109 |
"readCheck a pipe. |
|
110 |
Do this and interrupt the reading thread heavily" |
|
111 |
||
112 |
| s p count nLoop| |
|
113 |
||
114 |
nLoop := 1000. |
|
115 |
||
170 | 116 |
"/ self createTestFile. |
121 | 117 |
|
118 |
s := PipeStream readingFrom:'sleep 5'. |
|
119 |
||
120 |
p := [ |
|
1447 | 121 |
s readWait. |
122 |
'readWait finished' printCR. |
|
121 | 123 |
] forkAt:7. |
124 |
||
125 |
count := 0. |
|
126 |
[p isDead] whileFalse:[ |
|
1447 | 127 |
Delay waitForMilliseconds:5. |
128 |
p interruptWith:[count := count + 1]. |
|
121 | 129 |
]. |
130 |
('readWait interrupted <1p> times' expandMacrosWith:count) printCR. |
|
131 |
||
132 |
s close. |
|
133 |
||
134 |
" |
|
135 |
self new testReadCheckPipe4 |
|
136 |
" |
|
137 |
||
138 |
"Modified: / 12.8.1998 / 13:42:13 / cg" |
|
139 |
! |
|
140 |
||
141 |
testReadCheckPipe5 |
|
142 |
"readCheck a pipe. |
|
143 |
Do this and interrupt the reading thread heavily" |
|
144 |
||
145 |
| s p count nLoop| |
|
146 |
||
147 |
nLoop := 1000. |
|
148 |
||
170 | 149 |
"/ self createTestFile. |
121 | 150 |
|
151 |
s := PipeStream readingFrom:'sleep 5; echo hello'. |
|
152 |
||
153 |
p := [ |
|
1447 | 154 |
s readWait. |
155 |
'readWait finished' printCR. |
|
121 | 156 |
] forkAt:7. |
157 |
||
158 |
count := 0. |
|
159 |
[p isDead] whileFalse:[ |
|
1447 | 160 |
Delay waitForMilliseconds:5. |
161 |
p interruptWith:[count := count + 1]. |
|
121 | 162 |
]. |
163 |
('readWait interrupted <1p> times' expandMacrosWith:count) printCR. |
|
164 |
||
165 |
s close. |
|
166 |
||
167 |
" |
|
168 |
self new testReadCheckPipe5 |
|
169 |
" |
|
170 |
||
171 |
"Modified: / 12.8.1998 / 13:42:13 / cg" |
|
172 |
! |
|
173 |
||
174 |
testReadPipe6 |
|
175 |
"read a pipe. |
|
176 |
Do this and interrupt the reading thread heavily" |
|
177 |
||
1215
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
178 |
| s p count nLoop error | |
121 | 179 |
|
1215
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
180 |
error := nil. |
121 | 181 |
nLoop := 1000. |
182 |
||
170 | 183 |
"/ self createTestFile. |
121 | 184 |
|
185 |
s := PipeStream readingFrom:'sleep 5'. |
|
186 |
||
187 |
p := [ |
|
1447 | 188 |
[ |
189 |
'read: ' print. s nextLine printCR. |
|
190 |
] on: Error do:[:ex| |
|
191 |
error := ex. |
|
192 |
] |
|
121 | 193 |
] forkAt:7. |
194 |
||
195 |
count := 0. |
|
196 |
[p isDead] whileFalse:[ |
|
1447 | 197 |
Delay waitForMilliseconds:5. |
198 |
p interruptWith:[count := count + 1]. |
|
121 | 199 |
]. |
200 |
('read interrupted <1p> times' expandMacrosWith:count) printCR. |
|
201 |
||
202 |
s close. |
|
203 |
||
1215
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
204 |
self assert: error isNil |
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
205 |
|
121 | 206 |
" |
207 |
self new testReadPipe6 |
|
208 |
" |
|
209 |
||
210 |
"Modified: / 12.8.1998 / 13:42:13 / cg" |
|
211 |
! |
|
212 |
||
213 |
testReadPipe7 |
|
214 |
"read a pipe. |
|
215 |
Do this and interrupt the reading thread heavily" |
|
216 |
||
1215
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
217 |
|s p count nLoop error | |
121 | 218 |
|
219 |
nLoop := 1000. |
|
220 |
||
170 | 221 |
"/ self createTestFile. |
121 | 222 |
|
223 |
s := PipeStream readingFrom:'sleep 5; echo hello'. |
|
224 |
||
225 |
p := [ |
|
1447 | 226 |
[ |
227 |
'read: ' print. s nextLine printCR. |
|
228 |
] on: Error do:[:ex| |
|
229 |
error := ex. |
|
230 |
] |
|
121 | 231 |
] forkAt:7. |
232 |
||
233 |
count := 0. |
|
234 |
[p isDead] whileFalse:[ |
|
1447 | 235 |
Delay waitForMilliseconds:5. |
236 |
p interruptWith:[count := count + 1]. |
|
121 | 237 |
]. |
238 |
('read interrupted <1p> times' expandMacrosWith:count) printCR. |
|
239 |
||
240 |
s close. |
|
241 |
||
1447 | 242 |
self assert: error isNil |
1215
6c8217e7f690
class: RegressionTests::PipeStreamTest
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1110
diff
changeset
|
243 |
|
121 | 244 |
" |
245 |
self test7 |
|
246 |
" |
|
247 |
||
248 |
"Modified: / 12.8.1998 / 13:42:13 / cg" |
|
1605
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
249 |
! |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
250 |
|
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
251 |
testTTY |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
252 |
"Test TTY / PTY related methods on pipes (should throw error)" |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
253 |
|
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
254 |
| s | |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
255 |
|
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
256 |
s := PipeStream readingFrom:'echo hello'. |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
257 |
[ |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
258 |
self deny: s isTTY. |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
259 |
self should: [ s getTTYAttributes ] raise: OsError. |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
260 |
s nextLine |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
261 |
] ensure:[ |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
262 |
s close. |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
263 |
] |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
264 |
|
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
265 |
"Created: / 31-05-2017 / 07:35:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5ff1befbd463
Added tests for (UNIX) TTY / PTY attribute support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1532
diff
changeset
|
266 |
"Modified: / 01-06-2017 / 21:27:13 / jv" |
121 | 267 |
! ! |
268 |
||
269 |
!PipeStreamTest class methodsFor:'documentation'! |
|
270 |
||
271 |
version |
|
272 |
^ '$Header$' |
|
1476
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
273 |
! |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
274 |
|
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
275 |
version_HG |
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
276 |
|
cd772f7900fe
RegressionTests::PipeStreamTest>>testPipeWriteRead refactored.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1289
diff
changeset
|
277 |
^ '$Changeset: <not expanded> $' |
121 | 278 |
! ! |
1082 | 279 |