File tree 7 files changed +28
-4
lines changed
weird_names_not_found_bug
7 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ var rescript_exe = require("../../../scripts/bin_path").rescript_exe;
5
5
6
6
var out = cp . spawnSync ( rescript_exe , { encoding : "utf8" } ) ;
7
7
8
- console . log ( out . stdout ) ;
9
8
if ( out . stderr !== "" ) {
10
9
assert . fail ( out . stderr ) ;
11
10
}
@@ -17,11 +16,11 @@ let files = [
17
16
"[[...params]].res" ,
18
17
"[slug_or_ID].res" ,
19
18
"404.res" ,
19
+ "utils.test.res" ,
20
20
] ;
21
21
22
22
for ( let f of files ) {
23
23
let { name } = path . parse ( f ) ;
24
24
let m = `./lib/js/src/${ name } .js` ;
25
- // console.log(m);
26
25
assert . deepEqual ( require ( m ) . a , 1 ) ;
27
26
}
Original file line number Diff line number Diff line change
1
+ module A = Demo
2
+ let a = 1
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " weird_names" ,
3
+ "version" : " 0.1.0" ,
4
+ "sources" : {
5
+ "dir" : " src" ,
6
+ "subdirs" : true
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ var cp = require ( "child_process" ) ;
2
+ var assert = require ( "assert" ) ;
3
+ var rescript_exe = require ( "../../../scripts/bin_path" ) . rescript_exe ;
4
+
5
+ var out = cp . spawnSync ( rescript_exe , { encoding : "utf8" } ) ;
6
+ if ( out . stderr !== "" ) {
7
+ assert . fail ( out . stderr ) ;
8
+ }
9
+
10
+ if ( ! out . stdout . includes ( `The module or file Demo can't be found.` ) ) {
11
+ assert . fail ( out . stdout ) ;
12
+ }
Original file line number Diff line number Diff line change
1
+ let a = 1
Original file line number Diff line number Diff line change
1
+ module A = Demo
2
+ let a = 1
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ function runTests() {
79
79
console . log ( stdout ) ;
80
80
81
81
if ( error !== null ) {
82
- console . log ( stderr ) ;
83
- throw new Error ( `❌ error in ${ file } : \n ${ error } ` ) ;
82
+ console . log ( `❌ error in ${ file } with stderr:\n` , stderr ) ;
83
+ throw error ;
84
84
} else {
85
85
console . log ( "✅ success in" , file ) ;
86
86
}
You can’t perform that action at this time.
0 commit comments