MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_tokenize_for_fts

Function test_tokenize_for_fts

atomic-core/src/pristine/tables.rs:1118–1127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1116
1117 #[test]
1118 fn test_tokenize_for_fts() {
1119 let tokens = tokenize_for_fts("Fix authentication bug in auth.rs");
1120 assert!(tokens.contains(&"fix".to_string()));
1121 assert!(tokens.contains(&"authentication".to_string()));
1122 assert!(tokens.contains(&"bug".to_string()));
1123 assert!(tokens.contains(&"auth".to_string()));
1124 // "rs" and "in" are < 3 chars, filtered out
1125 assert!(!tokens.contains(&"rs".to_string()));
1126 assert!(!tokens.contains(&"in".to_string()));
1127 }
1128
1129 #[test]
1130 fn test_tokenize_for_fts_filters_short() {

Callers

nothing calls this directly

Calls 1

tokenize_for_ftsFunction · 0.85

Tested by

no test coverage detected