()
| 288 | |
| 289 | #[test] |
| 290 | fn init_sig_short_and_long() { |
| 291 | assert_eq!(init_signature("[1, 2]"), "= [1, 2]"); |
| 292 | let long = "x".repeat(150); |
| 293 | let sig = init_signature(&long); |
| 294 | assert!(sig.starts_with("= ")); |
| 295 | assert!(sig.ends_with("...")); |
| 296 | assert_eq!(utf16_len(&sig[2..sig.len() - 3]), 100); |
| 297 | } |
| 298 | |
| 299 | /// A cut that would split a surrogate pair stops before it, and is still |
| 300 | /// marked as a cut: what tree-sitter-helpers.ts initSignature writes. |
nothing calls this directly
no test coverage detected