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 = [
2216 "knuffel",2216 "knuffel",
2217 "miette",2217 "miette",
2218 "niri-ipc",2218 "niri-ipc",
2219+ "pretty_assertions",
2219 "regex",2220 "regex",
2220 "smithay",2221 "smithay",
2221 "tracing",2222 "tracing",
@@ -2682,6 +2683,16 @@ version = "0.2.17"
2682 source = "registry+https://github.com/rust-lang/crates.io-index"2683 source = "registry+https://github.com/rust-lang/crates.io-index"
2683 checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"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 [[package]]2696 [[package]]
2686 name = "proc-macro-crate"2697 name = "proc-macro-crate"
2687 version = "1.3.1"2698 version = "1.3.1"
@@ -4375,6 +4386,12 @@ version = "0.2.6"
4375 source = "registry+https://github.com/rust-lang/crates.io-index"4386 source = "registry+https://github.com/rust-lang/crates.io-index"
4376 checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852"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 [[package]]4395 [[package]]
4379 name = "yansi-term"4396 name = "yansi-term"
4380 version = "0.1.2"4397 version = "0.1.2"
niri-config/Cargo.tomlmodified+3 -0
@@ -17,3 +17,6 @@ regex = "1.10.5"
17 smithay = { workspace = true, features = ["backend_libinput"] }17 smithay = { workspace = true, features = ["backend_libinput"] }
18 tracing.workspace = true18 tracing.workspace = true
19 tracy-client.workspace = true19 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 #[cfg(test)]2321 #[cfg(test)]
2322 mod tests {2322 mod tests {
2323+ use pretty_assertions::assert_eq;
2324+
2323 use super::*;2325 use super::*;
2324 2326
2325 #[track_caller]2327 #[track_caller]