git ssb

0+

cel-desktop / ssb-pkg



Tree: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44

Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-50-fs-runtime-layer / test-x2-index.js

16400 bytesRaw
1/* eslint-disable brace-style */
2/* eslint-disable complexity */
3/* eslint-disable no-path-concat */
4
5'use strict';
6
7var fs = require('fs');
8var path = require('path');
9var assert = require('assert');
10var theRequireContentA = './test-z-asset-A.css';
11var theRequireContentB = 'test-z-asset-B.css';
12
13function firstLowerCase (s) {
14 return s.slice(0, 1).toLowerCase() + s.slice(1);
15}
16
17function firstUpperCase (s) {
18 return s.slice(0, 1).toUpperCase() + s.slice(1);
19}
20
21// ///////////////////////////////////////////////////////////////////////////
22
23fs.readFile(path.join(__dirname, theRequireContentA), function (e01, v01) {
24fs.readFile(__dirname + path.sep + theRequireContentB, function (e02, v02) {
25fs.readFile(__dirname + '/' + theRequireContentB, function (e03, v03) {
26fs.readFile(firstLowerCase(path.join(__dirname, theRequireContentA)), function (e04, v04) {
27fs.readFile(firstLowerCase(__dirname + path.sep + theRequireContentB), function (e05, v05) {
28fs.readFile(firstLowerCase(__dirname + '/' + theRequireContentB), function (e06, v06) {
29fs.readFile(firstUpperCase(path.join(__dirname, theRequireContentA)), function (e07, v07) {
30fs.readFile(firstUpperCase(__dirname + path.sep + theRequireContentB), function (e08, v08) {
31fs.readFile(firstUpperCase(__dirname + '/' + theRequireContentB), function (e09, v09) {
32//
33
34fs.readFile(path.join(__dirname, theRequireContentA), { encoding: 'utf8' }, function (e01a, v01a) {
35fs.readFile(__dirname + path.sep + theRequireContentB, { encoding: 'utf8' }, function (e02a, v02a) {
36fs.readFile(__dirname + '/' + theRequireContentB, { encoding: 'utf8' }, function (e03a, v03a) {
37fs.readFile(firstLowerCase(path.join(__dirname, theRequireContentA)), { encoding: 'utf8' }, function (e04a, v04a) {
38fs.readFile(firstLowerCase(__dirname + path.sep + theRequireContentB), { encoding: 'utf8' }, function (e05a, v05a) {
39fs.readFile(firstLowerCase(__dirname + '/' + theRequireContentB), { encoding: 'utf8' }, function (e06a, v06a) {
40fs.readFile(firstUpperCase(path.join(__dirname, theRequireContentA)), { encoding: 'utf8' }, function (e07a, v07a) {
41fs.readFile(firstUpperCase(__dirname + path.sep + theRequireContentB), { encoding: 'utf8' }, function (e08a, v08a) {
42fs.readFile(firstUpperCase(__dirname + '/' + theRequireContentB), { encoding: 'utf8' }, function (e09a, v09a) {
43//
44
45fs.readFile(path.join(__dirname, theRequireContentA + '-no-such'), function (e10, v10) {
46fs.readFile(__dirname + path.sep + theRequireContentB + '-no-such', function (e11, v11) {
47fs.readFile(__dirname + '/' + theRequireContentB + '-no-such', function (e12, v12) {
48fs.readFile(firstLowerCase(path.join(__dirname, theRequireContentA + '-no-such')), function (e13, v13) {
49fs.readFile(firstLowerCase(__dirname + path.sep + theRequireContentB + '-no-such'), function (e14, v14) {
50fs.readFile(firstLowerCase(__dirname + '/' + theRequireContentB + '-no-such'), function (e15, v15) {
51fs.readFile(firstUpperCase(path.join(__dirname, theRequireContentA + '-no-such')), function (e16, v16) {
52fs.readFile(firstUpperCase(__dirname + path.sep + theRequireContentB + '-no-such'), function (e17, v17) {
53fs.readFile(firstUpperCase(__dirname + '/' + theRequireContentB + '-no-such'), function (e18, v18) {
54//
55
56fs.readFile(__dirname, function (e19, v19) {
57fs.readFile(path.dirname(__dirname), function (e20, v20) {
58fs.readFile(path.dirname(path.dirname(__dirname)), function (e21, v21) {
59fs.readFile(firstLowerCase(__dirname), function (e22, v22) {
60fs.readFile(firstLowerCase(path.dirname(__dirname)), function (e23, v23) {
61fs.readFile(firstLowerCase(path.dirname(path.dirname(__dirname))), function (e24, v24) {
62fs.readFile(firstUpperCase(__dirname), function (e25, v25) {
63fs.readFile(firstUpperCase(path.dirname(__dirname)), function (e26, v26) {
64fs.readFile(firstUpperCase(path.dirname(path.dirname(__dirname))), function (e27, v27) {
65//
66
67fs.open(path.join(__dirname, theRequireContentA), 'r', function (e28, v28) {
68fs.open(__dirname + path.sep + theRequireContentB, 'r', function (e29, v29) {
69fs.open(__dirname + '/' + theRequireContentB, 'r', function (e30, v30) {
70fs.open(firstLowerCase(path.join(__dirname, theRequireContentA)), 'r', function (e31, v31) {
71fs.open(firstLowerCase(__dirname + path.sep + theRequireContentB), 'r', function (e32, v32) {
72fs.open(firstLowerCase(__dirname + '/' + theRequireContentB), 'r', function (e33, v33) {
73fs.open(firstUpperCase(path.join(__dirname, theRequireContentA)), 'r', function (e34, v34) {
74fs.open(firstUpperCase(__dirname + path.sep + theRequireContentB), 'r', function (e35, v35) {
75fs.open(firstUpperCase(__dirname + '/' + theRequireContentB), 'r', function (e36, v36) {
76//
77
78fs.open(path.join(__dirname, theRequireContentA + '-no-such'), 'r', function (e37, v37) {
79fs.open(__dirname + path.sep + theRequireContentB + '-no-such', 'r', function (e38, v38) {
80fs.open(__dirname + '/' + theRequireContentB + '-no-such', 'r', function (e39, v39) {
81fs.open(firstLowerCase(path.join(__dirname, theRequireContentA + '-no-such')), 'r', function (e40, v40) {
82fs.open(firstLowerCase(__dirname + path.sep + theRequireContentB + '-no-such'), 'r', function (e41, v41) {
83fs.open(firstLowerCase(__dirname + '/' + theRequireContentB + '-no-such'), 'r', function (e42, v42) {
84fs.open(firstUpperCase(path.join(__dirname, theRequireContentA + '-no-such')), 'r', function (e43, v43) {
85fs.open(firstUpperCase(__dirname + path.sep + theRequireContentB + '-no-such'), 'r', function (e44, v44) {
86fs.open(firstUpperCase(__dirname + '/' + theRequireContentB + '-no-such'), 'r', function (e45, v45) {
87//
88
89fs.open(__dirname, 'r', function (e46, v46) {
90fs.open(path.dirname(__dirname), 'r', function (e47, v47) {
91fs.open(path.dirname(__dirname), 'r', function (e48, v48) { // not "path.dirname(path.dirname" due to denominator
92fs.open(firstLowerCase(__dirname), 'r', function (e49, v49) {
93fs.open(firstLowerCase(path.dirname(__dirname)), 'r', function (e50, v50) {
94fs.open(firstLowerCase(path.dirname(__dirname)), 'r', function (e51, v51) { // not "path.dirname(path.dirname" due to denominator
95fs.open(firstUpperCase(__dirname), 'r', function (e52, v52) {
96fs.open(firstUpperCase(path.dirname(__dirname)), 'r', function (e53, v53) {
97fs.open(firstUpperCase(path.dirname(__dirname)), 'r', function (e54, v54) { // not "path.dirname(path.dirname" due to denominator
98//
99
100fs.readdir(__dirname, function (e55, v55) {
101fs.readdir(path.dirname(__dirname), function (e56, v56) {
102fs.readdir(path.dirname(path.dirname(__dirname)), function (e57, v57) {
103fs.readdir(firstLowerCase(__dirname), function (e58, v58) {
104fs.readdir(firstLowerCase(path.dirname(__dirname)), function (e59, v59) {
105fs.readdir(firstLowerCase(path.dirname(path.dirname(__dirname))), function (e60, v60) {
106fs.readdir(firstUpperCase(__dirname), function (e61, v61) {
107fs.readdir(firstUpperCase(path.dirname(__dirname)), function (e62, v62) {
108fs.readdir(firstUpperCase(path.dirname(path.dirname(__dirname))), function (e63, v63) {
109//
110
111fs.readdir(__dirname + '-no-such', function (e64, v64) {
112fs.readdir(path.dirname(__dirname) + '-no-such', function (e65, v65) {
113fs.readdir(path.dirname(path.dirname(__dirname)) + '-no-such', function (e66, v66) {
114fs.readdir(firstLowerCase(__dirname + '-no-such'), function (e67, v67) {
115fs.readdir(firstLowerCase(path.dirname(__dirname) + '-no-such'), function (e68, v68) {
116fs.readdir(firstLowerCase(path.dirname(path.dirname(__dirname)) + '-no-such'), function (e69, v69) {
117fs.readdir(firstUpperCase(__dirname + '-no-such'), function (e70, v70) {
118fs.readdir(firstUpperCase(path.dirname(__dirname) + '-no-such'), function (e71, v71) {
119fs.readdir(firstUpperCase(path.dirname(path.dirname(__dirname)) + '-no-such'), function (e72, v72) {
120//
121
122fs.readdir(path.join(__dirname, theRequireContentA), function (e73, v73) {
123fs.readdir(__dirname + path.sep + theRequireContentB, function (e74, v74) {
124fs.readdir(__dirname + '/' + theRequireContentB, function (e75, v75) {
125fs.readdir(firstLowerCase(path.join(__dirname, theRequireContentA)), function (e76, v76) {
126fs.readdir(firstLowerCase(__dirname + path.sep + theRequireContentB), function (e77, v77) {
127fs.readdir(firstLowerCase(__dirname + '/' + theRequireContentB), function (e78, v78) {
128fs.readdir(firstUpperCase(path.join(__dirname, theRequireContentA)), function (e79, v79) {
129fs.readdir(firstUpperCase(__dirname + path.sep + theRequireContentB), function (e80, v80) {
130fs.readdir(firstUpperCase(__dirname + '/' + theRequireContentB), function (e81, v81) {
131//
132
133fs.fstat(v28, function (e136, v136) {
134fs.fstat(v29, function (e137, v137) {
135fs.fstat(v30, function (e138, v138) {
136fs.fstat(v46, function (e139, v139) {
137fs.fstat(v47, function (e140, v140) {
138fs.fstat(v48, function (e141, v141) {
139fs.fstat(v49, function (e142, v142) {
140fs.fstat(v50, function (e143, v143) {
141fs.fstat(v51, function (e144, v144) {
142 console.log([
143
144 '******************************************************',
145 '******************************************************',
146 '******************************************************',
147
148 'readFile', assert(e01 === null),
149 e01 === null, v01.length,
150 e02 === null, v02.length,
151 e03 === null, v03.length,
152 e04 === null, v04.length,
153 e05 === null, v05.length,
154 e06 === null, v06.length,
155 e07 === null, v07.length,
156 e08 === null, v08.length,
157 e09 === null, v09.length,
158
159 '******************************************************',
160 '******************************************************',
161 '******************************************************',
162
163 'readFile', assert(e01a === null),
164 e01a === null, v01a.length,
165 e02a === null, v02a.length,
166 e03a === null, v03a.length,
167 e04a === null, v04a.length,
168 e05a === null, v05a.length,
169 e06a === null, v06a.length,
170 e07a === null, v07a.length,
171 e08a === null, v08a.length,
172 e09a === null, v09a.length,
173
174 '******************************************************',
175 '******************************************************',
176 '******************************************************',
177
178 'readFile-no-such', assert(e10.errno === -4058 || e10.errno === -2),
179 e10.errno, e10.code, v10 === undefined,
180 e11.errno, e11.code, v11 === undefined,
181 e12.errno, e12.code, v12 === undefined,
182 e13.errno, e13.code, v13 === undefined,
183 e14.errno, e14.code, v14 === undefined,
184 e15.errno, e15.code, v15 === undefined,
185 e16.errno, e16.code, v16 === undefined,
186 e17.errno, e17.code, v17 === undefined,
187 e18.errno, e18.code, v18 === undefined,
188
189 '******************************************************',
190 '******************************************************',
191 '******************************************************',
192
193 'readFile-directory', assert(!e19 || e19.errno === -4068 || e19.errno === -21),
194 !e19 || e19.errno, !e19 || e19.code, v19 === undefined,
195 !e20 || e20.errno, !e20 || e20.code, v20 === undefined,
196 !e21 || e21.errno, !e21 || e21.code, v21 === undefined,
197 !e22 || e22.errno, !e22 || e22.code, v22 === undefined,
198 !e23 || e23.errno, !e23 || e23.code, v23 === undefined,
199 !e24 || e24.errno, !e24 || e24.code, v24 === undefined,
200 !e25 || e25.errno, !e25 || e25.code, v25 === undefined,
201 !e26 || e26.errno, !e26 || e26.code, v26 === undefined,
202 !e27 || e27.errno, !e27 || e27.code, v27 === undefined,
203
204 '******************************************************',
205 '******************************************************',
206 '******************************************************',
207
208 'open', assert(e28 === null),
209 e28 === null, typeof v28,
210 e29 === null, typeof v29,
211 e30 === null, typeof v30,
212 e31 === null, typeof v31,
213 e32 === null, typeof v32,
214 e33 === null, typeof v33,
215 e34 === null, typeof v34,
216 e35 === null, typeof v35,
217 e36 === null, typeof v36,
218
219 '******************************************************',
220 '******************************************************',
221 '******************************************************',
222
223 'open-no-such', assert(e37.errno === -4058 || e37.errno === -2),
224 e37.errno, e37.code, v37 === undefined,
225 e38.errno, e38.code, v38 === undefined,
226 e39.errno, e39.code, v39 === undefined,
227 e40.errno, e40.code, v40 === undefined,
228 e41.errno, e41.code, v41 === undefined,
229 e42.errno, e42.code, v42 === undefined,
230 e43.errno, e43.code, v43 === undefined,
231 e44.errno, e44.code, v44 === undefined,
232 e45.errno, e45.code, v45 === undefined,
233
234 '******************************************************',
235 '******************************************************',
236 '******************************************************',
237
238 'open-directory', assert(e46 === null),
239 e46 === null, typeof v46,
240 e47 === null, typeof v47,
241 e48 === null, typeof v48,
242 e49 === null, typeof v49,
243 e50 === null, typeof v50,
244 e51 === null, typeof v51,
245 e52 === null, typeof v52,
246 e53 === null, typeof v53,
247 e54 === null, typeof v54,
248
249 '******************************************************',
250 '******************************************************',
251 '******************************************************',
252
253 'readdir', assert(e55 === null), assert(v55.length > 0),
254 e55 === null, v55.length > 0,
255 e56 === null, v56.length > 0,
256 e57 === null, v57.length > 0,
257 e58 === null, v58.length > 0,
258 e59 === null, v59.length > 0,
259 e60 === null, v60.length > 0,
260 e61 === null, v61.length > 0,
261 e62 === null, v62.length > 0,
262 e63 === null, v63.length > 0,
263
264 '******************************************************',
265 '******************************************************',
266 '******************************************************',
267
268 'readdir-no-such', assert(e64.errno === -4058 || e64.errno === -2),
269 e64.errno, e64.code, v64 === undefined,
270 e65.errno, e65.code, v65 === undefined,
271 e66.errno, e66.code, v66 === undefined,
272 e67.errno, e67.code, v67 === undefined,
273 e68.errno, e68.code, v68 === undefined,
274 e69.errno, e69.code, v69 === undefined,
275 e70.errno, e70.code, v70 === undefined,
276 e71.errno, e71.code, v71 === undefined,
277 e72.errno, e72.code, v72 === undefined,
278
279 '******************************************************',
280 '******************************************************',
281 '******************************************************',
282
283 'readdir-file', assert(e73.errno === -4052 || e73.errno === -20),
284 e73.errno, e73.code, v73 === undefined,
285 e74.errno, e74.code, v74 === undefined,
286 e75.errno, e75.code, v75 === undefined,
287 e76.errno, e76.code, v76 === undefined,
288 e77.errno, e77.code, v77 === undefined,
289 e78.errno, e78.code, v78 === undefined,
290 e79.errno, e79.code, v79 === undefined,
291 e80.errno, e80.code, v80 === undefined,
292 e81.errno, e81.code, v81 === undefined,
293
294 '******************************************************',
295 '******************************************************',
296 '******************************************************',
297
298 'fstat', assert(e136 === null),
299 e136 === null, v136.mode, v136.birthtime.getYear(), v136.isFile(), v136.isDirectory(),
300 e137 === null, v137.mode, v137.birthtime.getYear(), v137.isFile(), v137.isDirectory(),
301 e138 === null, v138.mode, v138.birthtime.getYear(), v138.isFile(), v138.isDirectory(),
302 e139 === null, v139.mode, v139.birthtime.getYear(), v139.isFile(), v139.isDirectory(),
303 e140 === null, v140.mode, v140.birthtime.getYear(), v140.isFile(), v140.isDirectory(),
304 e141 === null, v141.mode, v141.birthtime.getYear(), v141.isFile(), v141.isDirectory(),
305 e142 === null, v142.mode, v142.birthtime.getYear(), v142.isFile(), v142.isDirectory(),
306 e143 === null, v143.mode, v143.birthtime.getYear(), v143.isFile(), v143.isDirectory(),
307 e144 === null, v144.mode, v144.birthtime.getYear(), v144.isFile(), v144.isDirectory(),
308
309 '******************************************************',
310 '******************************************************',
311 '******************************************************'
312
313 ].join('\n'));
314}); }); }); }); }); }); }); }); });
315}); }); }); }); }); }); }); }); });
316}); }); }); }); }); }); }); }); });
317}); }); }); }); }); }); }); }); });
318}); }); }); }); }); }); }); }); });
319}); }); }); }); }); }); }); }); });
320}); }); }); }); }); }); }); }); });
321}); }); }); }); }); }); }); }); });
322}); }); }); }); }); }); }); }); });
323}); }); }); }); }); }); }); }); });
324}); }); }); }); }); }); }); }); });
325

Built with git-ssb-web