diff --git a/Cargo.lock b/Cargo.lock index d287fcee0..6fe28d560 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,6 +114,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "automod" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edf3ee19dbc0a46d740f6f0926bde8c50f02bdbc7b536842da28f6ac56513a8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -209,7 +220,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -354,7 +365,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -365,7 +376,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -390,7 +401,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -437,7 +448,7 @@ checksum = "27540baf49be0d484d8f0130d7d8da3011c32a44d4fc873368154f1510e574a2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -490,7 +501,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -860,7 +871,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", "unicase", ] @@ -910,18 +921,18 @@ checksum = "dbd05acff31c8b626109e8e1db042b9bddb2b3ffba01ead93d15b78517a282ca" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1077,7 +1088,7 @@ checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -1103,9 +1114,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1136,9 +1147,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "snapbox" -version = "0.5.9" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac441e1ecf678f68423d47f376d53fabce1afba92c8f68e31508eb27df8562a" +checksum = "9ad8c7be18cc9ec7f4d7948ad6b9df0e04fc649663e3c0ed59f304ed17ca69e9" dependencies = [ "anstream", "anstyle", @@ -1158,9 +1169,9 @@ dependencies = [ [[package]] name = "snapbox-macros" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c4b838b05d15ab22754068cb73500b2f3b07bf09d310e15b27f88160f1de40" +checksum = "b1f4c14672714436c09254801c934b203196a51182a5107fb76591c7cc56424d" dependencies = [ "anstream", ] @@ -1196,9 +1207,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -1251,7 +1262,7 @@ checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] [[package]] @@ -1278,18 +1289,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -1300,10 +1311,11 @@ dependencies = [ [[package]] name = "trycmd" -version = "0.15.1" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14c6930faf7c6c4942ce17daa6f38d659d2ebf2b579a56b6926707038eb37b0" +checksum = "59709bd8eccada6a3fded26d22a7f2dcee406c18d3bd7ad2605ca3eeb8f6f6ec" dependencies = [ + "automod", "glob", "humantime", "humantime-serde", @@ -1749,5 +1761,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.66", ] diff --git a/crates/codespell-dict/Cargo.toml b/crates/codespell-dict/Cargo.toml index 16392ac17..d7ff5a999 100644 --- a/crates/codespell-dict/Cargo.toml +++ b/crates/codespell-dict/Cargo.toml @@ -25,7 +25,7 @@ unicase = "2.7" itertools = "0.12" codegenrs = "3.0" dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" typos = { path = "../typos" } [lints] diff --git a/crates/codespell-dict/tests/codegen.rs b/crates/codespell-dict/tests/codegen.rs index a25b44329..fb6d02eaf 100644 --- a/crates/codespell-dict/tests/codegen.rs +++ b/crates/codespell-dict/tests/codegen.rs @@ -7,7 +7,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/dict_codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/dict_codegen.rs"].raw()); } #[test] @@ -31,7 +31,7 @@ fn compat() { writeln!(content).unwrap(); } - snapbox::assert_eq(snapbox::file!["../assets/compatible.csv"], &content); + snapbox::assert_data_eq!(content, snapbox::file!["../assets/compatible.csv"].raw()); } fn is_word(word: &str) -> bool { diff --git a/crates/misspell-dict/Cargo.toml b/crates/misspell-dict/Cargo.toml index e5ca6f24e..f7950c55c 100644 --- a/crates/misspell-dict/Cargo.toml +++ b/crates/misspell-dict/Cargo.toml @@ -24,7 +24,7 @@ itertools = "0.12" codegenrs = "3.0" regex = "1" dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" [lints] workspace = true diff --git a/crates/misspell-dict/tests/codegen.rs b/crates/misspell-dict/tests/codegen.rs index 21852faf6..f9cf9233f 100644 --- a/crates/misspell-dict/tests/codegen.rs +++ b/crates/misspell-dict/tests/codegen.rs @@ -9,7 +9,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/dict_codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/dict_codegen.rs"].raw()); } fn generate(file: &mut W) { diff --git a/crates/typos-cli/Cargo.toml b/crates/typos-cli/Cargo.toml index 19a74f13f..57603b244 100644 --- a/crates/typos-cli/Cargo.toml +++ b/crates/typos-cli/Cargo.toml @@ -81,8 +81,8 @@ encoding_rs = "0.8.34" [dev-dependencies] assert_fs = "1.1" divan = "0.1.14" -snapbox = "0.5.9" -trycmd = "0.15.1" +snapbox = "0.6.5" +trycmd = "0.15.4" [[bench]] name = "check_file" diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index 49f6df088..5e6050c2b 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -88,6 +88,7 @@ pub(crate) struct StaticDictConfig { #[cfg(test)] mod tests { use itertools::Itertools; + use snapbox::prelude::*; use super::TYPE_SPECIFIC_DICTS; @@ -96,7 +97,7 @@ mod tests { let types: Vec<_> = TYPE_SPECIFIC_DICTS.iter().map(|(typ, _)| *typ).collect(); let types_unique: Vec<_> = types.clone().into_iter().unique().collect(); - snapbox::assert_eq(types.join("\n"), types_unique.join("\n")); + snapbox::assert_data_eq!(types_unique.join("\n"), types.join("\n").raw()); } #[test] @@ -108,6 +109,6 @@ mod tests { let types: Vec<_> = TYPE_SPECIFIC_DICTS.iter().map(|(typ, _)| *typ).collect(); let types_sorted: Vec<_> = types.iter().cloned().sorted().collect(); - snapbox::assert_eq(types.join("\n"), types_sorted.join("\n")); + snapbox::assert_data_eq!(types_sorted.join("\n"), types.join("\n").raw()); } } diff --git a/crates/typos-dict/Cargo.toml b/crates/typos-dict/Cargo.toml index 146303e2a..73f8b9188 100644 --- a/crates/typos-dict/Cargo.toml +++ b/crates/typos-dict/Cargo.toml @@ -27,7 +27,7 @@ unicase = "2.7" codegenrs = "3.0" dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } varcon = { version = "^0.7", path = "../varcon" } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" indexmap = "2.2.6" [lints] diff --git a/crates/typos-dict/tests/codegen.rs b/crates/typos-dict/tests/codegen.rs index 78ad440f8..0005f2f54 100644 --- a/crates/typos-dict/tests/codegen.rs +++ b/crates/typos-dict/tests/codegen.rs @@ -6,7 +6,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/word_codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/word_codegen.rs"].raw()); } fn generate(file: &mut W, prefix: &str, dict: &[u8]) { diff --git a/crates/typos-dict/tests/verify.rs b/crates/typos-dict/tests/verify.rs index 64fd15fdc..518f0ca65 100644 --- a/crates/typos-dict/tests/verify.rs +++ b/crates/typos-dict/tests/verify.rs @@ -25,7 +25,7 @@ fn verify() { drop(wtr); let content = String::from_utf8(content).unwrap(); - snapbox::assert_eq(snapbox::file!["../assets/words.csv"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../assets/words.csv"].raw()); } fn parse_dict(path: &str) -> Vec<(String, Vec)> { diff --git a/crates/typos-vars/Cargo.toml b/crates/typos-vars/Cargo.toml index d7a8e9b2b..f1a62fabd 100644 --- a/crates/typos-vars/Cargo.toml +++ b/crates/typos-vars/Cargo.toml @@ -28,7 +28,7 @@ unicase = "2.7" codegenrs = "3.0" itertools = "0.12" dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" [lints] workspace = true diff --git a/crates/typos-vars/tests/codegen.rs b/crates/typos-vars/tests/codegen.rs index a62fe4006..2ead53e15 100644 --- a/crates/typos-vars/tests/codegen.rs +++ b/crates/typos-vars/tests/codegen.rs @@ -9,7 +9,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/vars_codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/vars_codegen.rs"].raw()); } static CATEGORIES: [varcon::Category; 4] = [ diff --git a/crates/varcon/Cargo.toml b/crates/varcon/Cargo.toml index ce38bea9a..3c508fc75 100644 --- a/crates/varcon/Cargo.toml +++ b/crates/varcon/Cargo.toml @@ -26,7 +26,7 @@ varcon-core = { version = "^4.0", path = "../varcon-core" } [dev-dependencies] codegenrs = "3.0" varcon-core = { version = "^4.0", path = "../varcon-core", features = ["parser"] } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" [lints] workspace = true diff --git a/crates/varcon/tests/codegen.rs b/crates/varcon/tests/codegen.rs index f077a1741..743cf0c7c 100644 --- a/crates/varcon/tests/codegen.rs +++ b/crates/varcon/tests/codegen.rs @@ -9,7 +9,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/codegen.rs"].raw()); } fn generate(file: &mut W) { diff --git a/crates/wikipedia-dict/Cargo.toml b/crates/wikipedia-dict/Cargo.toml index 1d52e4720..521bf5a95 100644 --- a/crates/wikipedia-dict/Cargo.toml +++ b/crates/wikipedia-dict/Cargo.toml @@ -24,7 +24,7 @@ unicase = "2.7" itertools = "0.12" codegenrs = "3.0" dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } -snapbox = { version = "0.5.9", features = ["path"] } +snapbox = "0.6.5" [lints] workspace = true diff --git a/crates/wikipedia-dict/tests/codegen.rs b/crates/wikipedia-dict/tests/codegen.rs index bee7462fe..81f7f3e3d 100644 --- a/crates/wikipedia-dict/tests/codegen.rs +++ b/crates/wikipedia-dict/tests/codegen.rs @@ -7,7 +7,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::assert_eq(snapbox::file!["../src/dict_codegen.rs"], content); + snapbox::assert_data_eq!(content, snapbox::file!["../src/dict_codegen.rs"].raw()); } fn generate(file: &mut W) {