https://github.com/quickjs-ng/quickjs/issues/1178
| 895 | |
| 896 | // https://github.com/quickjs-ng/quickjs/issues/1178 |
| 897 | static void slice_string_tocstring(void) |
| 898 | { |
| 899 | JSRuntime *rt = new_runtime(); |
| 900 | JSContext *ctx = JS_NewContext(rt); |
| 901 | JSValue ret = eval(ctx, "'.'.repeat(16384).slice(1, -1)"); |
| 902 | assert(!JS_IsException(ret)); |
| 903 | assert(JS_IsString(ret)); |
| 904 | const char *str = JS_ToCString(ctx, ret); |
| 905 | assert(strlen(str) == 16382); |
| 906 | JS_FreeCString(ctx, str); |
| 907 | JS_FreeValue(ctx, ret); |
| 908 | JS_FreeContext(ctx); |
| 909 | JS_FreeRuntime(rt); |
| 910 | } |
| 911 | |
| 912 | static void immutable_array_buffer(void) |
| 913 | { |
no test coverage detected