Skip to content

Commit 1549b66

Browse files
committed
ecomfe#10 test case
1 parent 3e04565 commit 1549b66

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

test/test.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,58 @@
327327
<td><input value="complexNoRequests_alone" type="button" data-ignore="timestat"></td>
328328
<td class="uncheck"></td>
329329
</tr>
330+
<tr>
331+
<th colspan="2" align="left">Read Conf:</th>
332+
</tr>
333+
<tr>
334+
<td><input value="readConfig" type="button" data-ignore="timestat"></td>
335+
<td class="uncheck"></td>
336+
</tr>
330337
</table>
331338

332339
<script>
340+
341+
function readConfig( stateTd, callback ) {
342+
var conf = require.config();
343+
var ok = conf.baseUrl == './'
344+
&& conf.paths.css == '../src/css'
345+
&& conf.paths.abspath == '/test/pathstest'
346+
&& conf.map.usecjs.simple == 'cjs/simple'
347+
&& conf.map['usecjs/change2amd'].simple == 'amd/simple'
348+
&& conf.packages[0] == 'pkgclassic/1.0'
349+
&& conf.packages[1].name == 'pkgsetmain'
350+
&& conf.config['moduleconf/cat'].desc == 'cat'
351+
&& conf.urlArgs['*'] == 'urlArgs'
352+
&& conf.urlArgs['amd/simpleDependency'] == 'amdsd';
353+
354+
if (ok) {
355+
conf = require.config({
356+
paths: {
357+
'justfortest': 'justfortestpath'
358+
}
359+
});
360+
ok = conf.baseUrl == './'
361+
&& conf.paths.css == '../src/css'
362+
&& conf.paths.abspath == '/test/pathstest'
363+
&& conf.map.usecjs.simple == 'cjs/simple'
364+
&& conf.map['usecjs/change2amd'].simple == 'amd/simple'
365+
&& conf.packages[0] == 'pkgclassic/1.0'
366+
&& conf.packages[1].name == 'pkgsetmain'
367+
&& conf.config['moduleconf/cat'].desc == 'cat'
368+
&& conf.urlArgs['*'] == 'urlArgs'
369+
&& conf.urlArgs['amd/simpleDependency'] == 'amdsd'
370+
&& conf.paths.justfortest == 'justfortestpath';
371+
}
372+
373+
if (ok) {
374+
stateTd.className = 'pass';
375+
}
376+
else {
377+
stateTd.className = 'fail';
378+
}
379+
callback();
380+
}
381+
333382
function hasModuleRequest( moduleId ) {
334383
var scripts = document.getElementsByTagName( 'script' );
335384
var len = scripts.length;

0 commit comments

Comments
 (0)