@@ -60,17 +60,73 @@ Rebol [
60
60
d/size = none
61
61
]
62
62
delete %dir-606/
63
+
64
+ --test-- "make-dir/delete/exists? with path without a slash"
65
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/499
66
+ --assert %dir-606/ = make-dir %dir-606
67
+ --assert not error? try [delete %dir-606 ]
68
+ --assert not exists? %dir-606
69
+
70
+ --test-- "make-dir if file exists"
71
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1777
72
+ --assert not error? try [write %issue-1777.txt "test" ]
73
+ --assert error? er: try [make-dir %issue-1777.txt/ ]
74
+ --assert er/id = 'no-create
75
+ --assert not error? try [delete %issue-1777.txt ]
76
+
77
+ --test-- "open %."
78
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/117
79
+ --assert port? p: open %.
80
+ --assert 'dir = p/scheme/name
81
+ --assert 'dir = p/spec/scheme
82
+ --assert %./ = p/spec/ref
83
+ --assert port? close p
84
+
85
+ --test-- "open wildcard"
86
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/158
87
+ --assert all [
88
+ port? p: try [open %*.r3 ]
89
+ 'dir = p/scheme/name
90
+ 'dir = p/spec/scheme
91
+ %*.r3 = p/spec/ref
92
+ port? close p
93
+ ]
94
+
63
95
--test-- "DIR?"
64
96
;@@ https://github.com/Oldes/Rebol-issues/issues/602
65
97
; dir? only checks if the last char is / or \
66
98
--assert dir? %doesnotexists/
67
99
--assert not dir? %doesnotexists
68
100
--assert dir? %./
69
101
--assert not dir? %.
102
+ ; dir?/check
103
+ --assert not dir?/check %doesnotexists
104
+ --assert dir?/check %.
105
+ --assert dir?/check %./
106
+
107
+ --test-- "READ on existing dir-name"
108
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/635
109
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1675
110
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/2379
111
+ --assert block? b1: read %.
112
+ --assert block? b2: read %./
113
+ --assert b1 = b2
114
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/604
115
+ --assert 'dir = exists? %.
116
+ --assert 'dir = exists? %./
117
+
70
118
--test-- "READ on non-existing dir-name"
71
119
;@@ https://github.com/Oldes/Rebol-issues/issues/500
72
120
--assert error? e: try [read %carl-for-president/ ]
73
121
--assert e/id = 'cannot-open
122
+
123
+ --test-- "READ wildcard"
124
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/158
125
+ --assert all [block? b: try [read %*.r3 ] not empty? b]
126
+ --assert all [block? b: try [read %run-tests.?3 ] not empty? b]
127
+ --assert all [block? b: try [read %units/files/*.r3 ] not empty? b]
128
+ --assert all [block? b: try [read %*.xxx ] empty? b]
129
+
74
130
--test-- "DELETE-DIR"
75
131
;@@ https://github.com/Oldes/Rebol-issues/issues/1545
76
132
--assert all [
@@ -79,6 +135,8 @@ Rebol [
79
135
not error? delete-dir %units/temp-dir/
80
136
not exists? %units/temp-dir/
81
137
]
138
+ if system/platform = 'Windows [
139
+ ;@@ it looks that on Linux there is no lock on opened file
82
140
--assert all [
83
141
all [
84
142
not error? try [make-dir/deep %units/temp-dir/ ]
@@ -96,6 +154,7 @@ Rebol [
96
154
not error? delete-dir %units/temp-dir/
97
155
]
98
156
]
157
+ ]
99
158
100
159
--test-- "RENAME dir"
101
160
;@@ https://github.com/Oldes/Rebol-issues/issues/1533
@@ -262,7 +321,7 @@ if "true" <> get-env "CONTINUOUS_INTEGRATION" [
262
321
;- don't do these tests on Travis CI
263
322
===start-group=== "WHOIS scheme"
264
323
--test-- "read WHOIS"
265
- --assert string? try [read whois://google.com ]
324
+ --assert string? probe try [read whois://google.com ]
266
325
--test-- "write WHOIS"
267
326
--assert string? try [write whois://whois.nic.cz "seznam.cz" ]
268
327
===end-group===
0 commit comments