niri-config: Add pretty-assertions to tests
Browse files at this commitfee72b87cf732180889ebc9151b77249533d6995Parent: 6c47bd63 changed files +22 -0
- Cargo.lock +17 -0
- niri-config/Cargo.toml +3 -0
- niri-config/src/lib.rs +2 -0
Cargo.lockmodified+17 -0
| @@ -2216,6 +2216,7 @@ dependencies = [ | ||
| 2216 | 2216 | "knuffel", |
| 2217 | 2217 | "miette", |
| 2218 | 2218 | "niri-ipc", |
| 2219 | + "pretty_assertions", | |
| 2219 | 2220 | "regex", |
| 2220 | 2221 | "smithay", |
| 2221 | 2222 | "tracing", |
| @@ -2682,6 +2683,16 @@ version = "0.2.17" | ||
| 2682 | 2683 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2683 | 2684 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" |
| 2684 | 2685 | |
| 2686 | +[[package]] | |
| 2687 | +name = "pretty_assertions" | |
| 2688 | +version = "1.4.0" | |
| 2689 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2690 | +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" | |
| 2691 | +dependencies = [ | |
| 2692 | + "diff", | |
| 2693 | + "yansi", | |
| 2694 | +] | |
| 2695 | + | |
| 2685 | 2696 | [[package]] |
| 2686 | 2697 | name = "proc-macro-crate" |
| 2687 | 2698 | version = "1.3.1" |
| @@ -4375,6 +4386,12 @@ version = "0.2.6" | ||
| 4375 | 4386 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 4376 | 4387 | checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" |
| 4377 | 4388 | |
| 4389 | +[[package]] | |
| 4390 | +name = "yansi" | |
| 4391 | +version = "0.5.1" | |
| 4392 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4393 | +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" | |
| 4394 | + | |
| 4378 | 4395 | [[package]] |
| 4379 | 4396 | name = "yansi-term" |
| 4380 | 4397 | version = "0.1.2" |
niri-config/Cargo.tomlmodified+3 -0
| @@ -17,3 +17,6 @@ regex = "1.10.5" | ||
| 17 | 17 | smithay = { workspace = true, features = ["backend_libinput"] } |
| 18 | 18 | tracing.workspace = true |
| 19 | 19 | tracy-client.workspace = true |
| 20 | + | |
| 21 | +[dev-dependencies] | |
| 22 | +pretty_assertions = "1.4.0" |
niri-config/src/lib.rsmodified+2 -0
| @@ -2320,6 +2320,8 @@ pub fn set_miette_hook() -> Result<(), miette::InstallError> { | ||
| 2320 | 2320 | |
| 2321 | 2321 | #[cfg(test)] |
| 2322 | 2322 | mod tests { |
| 2323 | + use pretty_assertions::assert_eq; | |
| 2324 | + | |
| 2323 | 2325 | use super::*; |
| 2324 | 2326 | |
| 2325 | 2327 | #[track_caller] |