MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / init_sig_short_and_long

Function init_sig_short_and_long

codegraph-kernel/src/textutil.rs:290–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

init_signatureFunction · 0.85

Tested by

no test coverage detected