forge
Explore
Log in

Don't you dare go Hollow

niri-config: Add pretty-assertions to tests

Browse files at this commit

fee72b87cf732180889ebc9151b77249533d6995Ivan MolodetskikhParent: 6c47bd6
The config parse test is pretty big and it's impossible to tell the
difference from the normal assert.
Cargo.lockmodified+17 -0
@@ -2216,6 +2216,7 @@ dependencies = [
22162216 "knuffel",
22172217 "miette",
22182218 "niri-ipc",
2219+ "pretty_assertions",
22192220 "regex",
22202221 "smithay",
22212222 "tracing",
@@ -2682,6 +2683,16 @@ version = "0.2.17"
26822683 source = "registry+https://github.com/rust-lang/crates.io-index"
26832684 checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
26842685
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+
26852696 [[package]]
26862697 name = "proc-macro-crate"
26872698 version = "1.3.1"
@@ -4375,6 +4386,12 @@ version = "0.2.6"
43754386 source = "registry+https://github.com/rust-lang/crates.io-index"
43764387 checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852"
43774388
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+
43784395 [[package]]
43794396 name = "yansi-term"
43804397 version = "0.1.2"
niri-config/Cargo.tomlmodified+3 -0
@@ -17,3 +17,6 @@ regex = "1.10.5"
1717 smithay = { workspace = true, features = ["backend_libinput"] }
1818 tracing.workspace = true
1919 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> {
23202320
23212321 #[cfg(test)]
23222322 mod tests {
2323+ use pretty_assertions::assert_eq;
2324+
23232325 use super::*;
23242326
23252327 #[track_caller]