@@ -24,7 +24,7 @@ function test(file) {
24
24
// should be able to get an exported string
25
25
assert . strictEqual ( exports . __getString ( exports . COLOR ) , "red" ) ;
26
26
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
28
28
{
29
29
let str = "Hello world!𤭢" ;
30
30
let ref = exports . __retain ( exports . __allocString ( str ) ) ;
@@ -33,6 +33,21 @@ function test(file) {
33
33
exports . __release ( ref ) ;
34
34
}
35
35
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
+
36
51
// should be able to allocate a typed array
37
52
{
38
53
let arr = [ 1 , 2 , 3 , 4 , 5 , 0x80000000 | 0 ] ;
@@ -290,4 +305,4 @@ function testInstantiate(file) {
290
305
assert ( instance && instance instanceof WebAssembly . Instance ) ;
291
306
assert ( module && module instanceof WebAssembly . Module ) ;
292
307
} ) ( ) ;
293
- }
308
+ }
0 commit comments