File tree 6 files changed +39
-0
lines changed
6 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ stdweb-derive = { path = "../stdweb-derive" }
9
9
10
10
serde = " 1"
11
11
serde_derive = " 1"
12
+
13
+ dependency = { path = " dependency" }
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " dependency"
3
+ version = " 0.1.0"
4
+ authors = [" Jan Bujak <j@exia.io>" ]
5
+
6
+ [dependencies ]
7
+ stdweb = { path = " ../.." }
Original file line number Diff line number Diff line change
1
+ #[ macro_use]
2
+ extern crate stdweb;
3
+
4
+ pub fn call ( ) {
5
+ submodule:: call ( ) ;
6
+ }
7
+
8
+ mod submodule {
9
+ pub ( crate ) fn call ( ) {
10
+ js ! ( @( no_return)
11
+ Module . test_value = 123 ;
12
+ ) ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ extern crate serde;
17
17
#[ macro_use]
18
18
extern crate serde_derive;
19
19
20
+ extern crate dependency;
21
+
20
22
use std:: panic;
21
23
22
24
#[ macro_use]
Original file line number Diff line number Diff line change 1
1
#[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
2
2
mod test_js_export;
3
3
mod test_derive_reference_type;
4
+ mod test_misc;
4
5
5
6
pub mod exports {
6
7
#[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
@@ -11,4 +12,5 @@ pub fn run_all_tests() {
11
12
#[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
12
13
test_js_export:: run ( ) ;
13
14
test_derive_reference_type:: run ( ) ;
15
+ test_misc:: run ( ) ;
14
16
}
Original file line number Diff line number Diff line change
1
+ use utils:: * ;
2
+ use dependency;
3
+
4
+ pub fn run ( ) {
5
+ // See https://github.com/rust-lang/rust/issues/56639 for more details.
6
+ test ( "indirectly_call_js_snippet_from_a_submodule_in_another_crate" , || {
7
+ dependency:: call ( ) ;
8
+ js ! {
9
+ assert. strictEqual( Module . test_value, 123 ) ;
10
+ }
11
+ } ) ;
12
+ }
You can’t perform that action at this time.
0 commit comments