@@ -24,7 +24,7 @@ function test(file) {
2424 // should be able to get an exported string
2525 assert . strictEqual ( exports . __getString ( exports . COLOR ) , "red" ) ;
2626
27- // should be able to allocate and work with a new string
27+ // should be able to allocate and work with a new small string
2828 {
2929 let str = "Hello world!𤭢" ;
3030 let ref = exports . __retain ( exports . __allocString ( str ) ) ;
@@ -33,6 +33,21 @@ function test(file) {
3333 exports . __release ( ref ) ;
3434 }
3535
36+ // should be able to allocate and work with a new big string
37+ {
38+ let str = `
39+ ∀ ∁ ∂ ∃ ∄ ∅ ∆ ∇ ∈ ∉ ∊ ∋ ∌ ∍ ∎ ∏ ∐ ∑ − ∓ ∔ ∕ ∖ ∗ ∘ ∙ √ ∛
40+ ∜ ∝ ∞ ∟ ∠ ∡ ∢ ∣ ∤ ∥ ∦ ∧ ∨ ∩ ∪ ∫ ∬ ∭ ∮ ∯ ∰ ∱ ∲ ∳ ∴ ∵ ∶ ∷
41+ ∸ ∹ ∺ ∻ ∼ ∽ ∾ ∿ ≀ ≁ ≂ ≃ ≄ ≅ ≆ ≇ ≈ ≉ ≊ ≋ ≌ ≍ ≎ ≏ ≐ ≑ ≒ ≓
42+ ≔ ≕ ≖ ≗ ≘ ≙ ≚ ≛ ≜ ≝ ≞ ≟ ≠ ≡ ≢ ≣ ≤ ≥ ≦ ≧ ≨ ≩ ≪ ≫ ≬ ≭ ≮ ≯
43+ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ≺ ≻ ≼ ≽ ≾ ≿
44+ ` ;
45+ let ref = exports . __retain ( exports . __allocString ( str ) ) ;
46+ assert . strictEqual ( exports . __getString ( ref ) , str ) ;
47+ assert . strictEqual ( exports . strlen ( ref ) , str . length ) ;
48+ exports . __release ( ref ) ;
49+ }
50+
3651 // should be able to allocate a typed array
3752 {
3853 let arr = [ 1 , 2 , 3 , 4 , 5 , 0x80000000 | 0 ] ;
@@ -290,4 +305,4 @@ function testInstantiate(file) {
290305 assert ( instance && instance instanceof WebAssembly . Instance ) ;
291306 assert ( module && module instanceof WebAssembly . Module ) ;
292307 } ) ( ) ;
293- }
308+ }
0 commit comments