MCPcopy Create free account
hub / github.com/emwalker/digraph / token_length

Function token_length

backend/src/git/search.rs:603–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

601
602 #[test]
603 fn token_length() {
604 let token = (0..=20).map(|_| "a").collect::<String>();
605 assert_eq!(token.len(), 21);
606
607 // Long phrases are allowed for now, to accomodate synonym matches
608 let phrase = Search::parse(&format!("a aa aaa aaaa {token}")).unwrap();
609 assert_eq!(
610 phrase.tokens,
611 phrases(&["aa", "aaa", "aaaa", "aaaaaaaaaaaaaaaaaaaaa"])
612 );
613 }
614
615 #[test]
616 fn url() {

Callers

nothing calls this directly

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected