mirror of
https://github.com/crate-ci/typos.git
synced 2025-03-12 22:59:35 -04:00
refactor(dict): Drop a dict
This commit is contained in:
parent
c5137fd6aa
commit
fa6122604f
2 changed files with 3 additions and 184710 deletions
File diff suppressed because it is too large
Load diff
1
crates/typos-dict/benches/benches/map_codegen.rs
Symbolic link
1
crates/typos-dict/benches/benches/map_codegen.rs
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../src/word_codegen.rs
|
|
@ -6,10 +6,8 @@ fn codegen() {
|
||||||
generate_map(&mut map_content, "WORD", DICT);
|
generate_map(&mut map_content, "WORD", DICT);
|
||||||
let map_content = String::from_utf8(map_content).unwrap();
|
let map_content = String::from_utf8(map_content).unwrap();
|
||||||
let map_content = codegenrs::rustfmt(&map_content, None).unwrap();
|
let map_content = codegenrs::rustfmt(&map_content, None).unwrap();
|
||||||
snapbox::assert_data_eq!(
|
// Symlink handles `../benches/benches/map_codegen.rs`
|
||||||
&map_content,
|
snapbox::assert_data_eq!(&map_content, snapbox::file!["../src/word_codegen.rs"].raw());
|
||||||
snapbox::file!["../benches/benches/map_codegen.rs"].raw()
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut aho_corasick_content = vec![];
|
let mut aho_corasick_content = vec![];
|
||||||
generate_aho_corasick(&mut aho_corasick_content, "Word", DICT);
|
generate_aho_corasick(&mut aho_corasick_content, "Word", DICT);
|
||||||
|
@ -19,8 +17,6 @@ fn codegen() {
|
||||||
&aho_corasick_content,
|
&aho_corasick_content,
|
||||||
snapbox::file!["../benches/benches/aho_corasick_codegen.rs"].raw()
|
snapbox::file!["../benches/benches/aho_corasick_codegen.rs"].raw()
|
||||||
);
|
);
|
||||||
|
|
||||||
snapbox::assert_data_eq!(&map_content, snapbox::file!["../src/word_codegen.rs"].raw());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate_map<W: std::io::Write>(file: &mut W, name: &str, dict: &[u8]) {
|
fn generate_map<W: std::io::Write>(file: &mut W, name: &str, dict: &[u8]) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue