Skip to content

Commit b3484a3

Browse files
committed
test cases 4 ecomfe#37
1 parent 6424f59 commit b3484a3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/require-tourl.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@
8484
<label><input type="checkbox" name="global:paths-absolute" value="/test/pathstest?123" disabled/>global:paths-absolute</label>
8585
<label><input type="checkbox" name="global:paths-http" value="http://dd.com/tangram.js?123" disabled/>global:paths-http</label>
8686
<label><input type="checkbox" name="global:pkg-main" value="./pkgsetmain/2.0/index?123" disabled/>global:pkg-main</label>
87+
<label><input type="checkbox" name="global:pkg-main.js" value="./pkgsetmain/2.0/index.js?123" disabled/>global:pkg-main</label>
8788
<label><input type="checkbox" name="global:pkg-module" value="./pkgsetmain/2.0/mod?123" disabled/>global:pkg-module</label>
89+
<label><input type="checkbox" name="global:pkg-module.js" value="./pkgsetmain/2.0/mod.js?123" disabled/>global:pkg-module</label>
8890

8991
<label><input type="checkbox" name="local:normal" value="./normal?123" disabled/>local:normal</label>
9092
<label><input type="checkbox" name="local:normal.js" value="./normal.js?123" disabled/>local:normal.js</label>
@@ -93,7 +95,9 @@
9395
<label><input type="checkbox" name="local:paths-absolute" value="/test/pathstest?123" disabled/>local:paths-absolute</label>
9496
<label><input type="checkbox" name="local:paths-http" value="http://dd.com/tangram.js?123" disabled/>local:paths-http</label>
9597
<label><input type="checkbox" name="local:pkg-main" value="./pkgsetmain/2.0/index?123" disabled/>local:pkg-main</label>
98+
<label><input type="checkbox" name="local:pkg-main.js" value="./pkgsetmain/2.0/index.js?123" disabled/>local:pkg-main</label>
9699
<label><input type="checkbox" name="local:pkg-module" value="./pkgsetmain/2.0/mod?123" disabled/>local:pkg-module</label>
100+
<label><input type="checkbox" name="local:pkg-module.js" value="./pkgsetmain/2.0/mod.js?123" disabled/>local:pkg-module</label>
97101
<label><input type="checkbox" name="local:relative-id" value="./tourl/relative?123" disabled/>local:relative-id</label>
98102
<label><input type="checkbox" name="local:map" value="./cjs/simple?123" disabled/>local:map</label>
99103

@@ -110,7 +114,9 @@
110114
assert_toUrl( 'global:paths-absolute', require.toUrl( 'abspath' ) );
111115
assert_toUrl( 'global:paths-http', require.toUrl( 'tangram' ) );
112116
assert_toUrl( 'global:pkg-main', require.toUrl( 'pkgsetmain' ) );
117+
assert_toUrl( 'global:pkg-main.js', require.toUrl( 'pkgsetmain.js' ) );
113118
assert_toUrl( 'global:pkg-module', require.toUrl( 'pkgsetmain/mod' ) );
119+
assert_toUrl( 'global:pkg-module.js', require.toUrl( 'pkgsetmain/mod.js' ) );
114120

115121

116122
require( ['tourl/index'] );

test/tourl/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ define( function ( require ) {
88

99

1010
assert_toUrl( 'local:pkg-main', require.toUrl( 'pkgsetmain' ) );
11+
assert_toUrl( 'local:pkg-main.js', require.toUrl( 'pkgsetmain.js' ) );
1112
assert_toUrl( 'local:pkg-module', require.toUrl( '../pkgsetmain/mod' ) );
13+
assert_toUrl( 'local:pkg-module.js', require.toUrl( '../pkgsetmain/mod.js' ) );
1214

1315
assert_toUrl( 'local:relative-id', require.toUrl( './relative' ) );
1416
assert_toUrl( 'local:map', require.toUrl( '../simple' ) );
@@ -18,4 +20,4 @@ define( function ( require ) {
1820
require('./plugin!./relative');
1921
require('./plugin!../simple');
2022
return {};
21-
})
23+
})

0 commit comments

Comments
 (0)