diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/wasm-bindgen/tests/wasm/imports.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/wasm-bindgen/tests/wasm/imports.rs')
-rw-r--r-- | vendor/wasm-bindgen/tests/wasm/imports.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/wasm-bindgen/tests/wasm/imports.rs b/vendor/wasm-bindgen/tests/wasm/imports.rs index 88dbf5ed6..27e4a67dc 100644 --- a/vendor/wasm-bindgen/tests/wasm/imports.rs +++ b/vendor/wasm-bindgen/tests/wasm/imports.rs @@ -81,6 +81,12 @@ extern "C" { #[wasm_bindgen(js_namespace = same_js_namespace_from_module)] fn func_from_module_1_same_js_namespace(s: i32) -> i32; + + #[wasm_bindgen(js_name = "kebab-case")] + fn kebab_case() -> u32; + + #[wasm_bindgen(js_name = "\"string'literal\nbreakers\r")] + fn string_literal_breakers() -> u32; } #[wasm_bindgen(module = "tests/wasm/imports_2.js")] @@ -321,3 +327,9 @@ fn func_from_two_modules_same_js_namespace() { assert_eq!(func_from_module_1_same_js_namespace(2), 10); assert_eq!(func_from_module_2_same_js_namespace(2), 12); } + +#[wasm_bindgen_test] +fn invalid_idents() { + assert_eq!(kebab_case(), 42); + assert_eq!(string_literal_breakers(), 42); +} |