diff --git a/target-spec-miette/tests/datatest-snapshot/custom.rs b/target-spec-miette/tests/datatest-snapshot/custom.rs index 341037cbd85..81f2d854e61 100644 --- a/target-spec-miette/tests/datatest-snapshot/custom.rs +++ b/target-spec-miette/tests/datatest-snapshot/custom.rs @@ -12,6 +12,8 @@ use target_spec::TargetFeatures; use target_spec_miette::IntoMietteDiagnostic; pub(crate) fn custom_invalid(path: &Utf8Path, contents: String) -> datatest_stable::Result<()> { + std::env::set_var("CLICOLOR_FORCE", "1"); + let (_guard, insta_prefix) = bind_insta_settings(path, "../datatest-snapshot/snapshots/custom-invalid"); diff --git a/target-spec-miette/tests/datatest-snapshot/expr.rs b/target-spec-miette/tests/datatest-snapshot/expr.rs index 19c5ac1009e..3860df194a9 100644 --- a/target-spec-miette/tests/datatest-snapshot/expr.rs +++ b/target-spec-miette/tests/datatest-snapshot/expr.rs @@ -6,6 +6,8 @@ use datatest_stable::Utf8Path; use target_spec_miette::IntoMietteDiagnostic; pub(crate) fn expr_invalid(path: &Utf8Path, contents: String) -> datatest_stable::Result<()> { + std::env::set_var("CLICOLOR_FORCE", "1"); + let (_guard, insta_prefix) = bind_insta_settings(path, "../datatest-snapshot/snapshots/expr-invalid"); diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap index 41ad26660be..0143868125d 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap @@ -1,13 +1,13 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[2:13] - 1 โ”‚ { - 2 โ”‚ "arch": 123, - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ invalid type: integer `123`, expected a string - 3 โ”‚ "cpu": "x86-64", + 1 โ”‚ { + 2 โ”‚ "arch": 123, + ยท  โ–ฒ + ยท โ•ฐโ”€โ”€ invalid type: integer `123`, expected a string + 3 โ”‚ "cpu": "x86-64", โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap index f4a0364d15c..10b7979b405 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap @@ -1,13 +1,13 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[32:29] - 31 โ”‚ }, - 32 โ”‚ "target-endian": "middle", - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ unknown variant `middle`, expected `little` or `big` - 33 โ”‚ "target-family": ["unix"], + 31 โ”‚ }, + 32 โ”‚ "target-endian": "middle", + ยท  โ–ฒ + ยท โ•ฐโ”€โ”€ unknown variant `middle`, expected `little` or `big` + 33 โ”‚ "target-family": ["unix"], โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap index 8a1153ac2de..806da960d71 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap @@ -1,13 +1,13 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[33:27] - 32 โ”‚ "target-endian": "big", - 33 โ”‚ "target-family": "none", - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ invalid type: string "none", expected a sequence - 34 โ”‚ "target-mcount": "_mcount", + 32 โ”‚ "target-endian": "big", + 33 โ”‚ "target-family": "none", + ยท  โ–ฒ + ยท โ•ฐโ”€โ”€ invalid type: string "none", expected a sequence + 34 โ”‚ "target-mcount": "_mcount", โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap index ad57a582f7c..4ea91b22b4c 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap @@ -1,13 +1,13 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[52:30] - 51 โ”‚ ], - 52 โ”‚ "target-pointer-width": "xx", - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ error parsing as integer: invalid digit found in string - 53 โ”‚ "supports-xray": true, + 51 โ”‚ ], + 52 โ”‚ "target-pointer-width": "xx", + ยท  โ–ฒ + ยท โ•ฐโ”€โ”€ error parsing as integer: invalid digit found in string + 53 โ”‚ "supports-xray": true, โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap index dbda9c0e9cb..7633fc83c1f 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap @@ -1,12 +1,12 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[35:1] - 34 โ”‚ "target-pointer-width": "64" - 35 โ”‚ } - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ missing field `arch` + 34 โ”‚ "target-pointer-width": "64" + 35 โ”‚ } + ยท โ–ฒ + ยท โ•ฐโ”€โ”€ missing field `arch` โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap index 3ad19e5dc4e..7f369ef23d7 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap @@ -1,12 +1,12 @@ --- -source: target-spec-miette/tests/snapshot/custom.rs +source: target-spec-miette/tests/datatest-snapshot/custom.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error deserializing custom target JSON for `my-target` + ร— error deserializing custom target JSON for `my-target` โ•ญโ”€[40:13] - 39 โ”‚ "leak", - 40 โ”‚ "memory", - ยท โ–ฒ - ยท โ•ฐโ”€โ”€ EOF while parsing a value + 39 โ”‚ "leak", + 40 โ”‚ "memory", + ยท  โ–ฒ + ยท โ•ฐโ”€โ”€ EOF while parsing a value โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap index 4d0c5431f61..549e59cfd80 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap @@ -3,9 +3,9 @@ source: target-spec-miette/tests/datatest-snapshot/expr.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error parsing cfg() expression + ร— error parsing cfg() expression โ•ญโ”€โ”€โ”€โ”€ - 1 โ”‚ cfg(target_does_not_exist = "unix") - ยท โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ - ยท โ•ฐโ”€โ”€ expected one of `target_arch`, `target_feature`, `target_os`, `target_family`, `target_env`, `target_endian`, `target_has_atomic`, `target_pointer_width`, `target_vendor` here + 1 โ”‚ cfg(target_does_not_exist = "unix") + ยท  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ + ยท โ•ฐโ”€โ”€ expected one of `target_arch`, `target_feature`, `target_os`, `target_family`, `target_env`, `target_endian`, `target_has_atomic`, `target_pointer_width`, `target_vendor` here โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap index 487a3df877d..00fcc412510 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap @@ -3,9 +3,9 @@ source: target-spec-miette/tests/datatest-snapshot/expr.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error parsing cfg() expression + ร— error parsing cfg() expression โ•ญโ”€โ”€โ”€โ”€ - 1 โ”‚ cfg(unix - ยท โ”ฌ - ยท โ•ฐโ”€โ”€ expected one of `=`, `,`, `)` here + 1 โ”‚ cfg(unix + ยท  โ”ฌ + ยท โ•ฐโ”€โ”€ expected one of `=`, `,`, `)` here โ•ฐโ”€โ”€โ”€โ”€ diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap index 56786ea4402..1a874392834 100644 --- a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap +++ b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap @@ -3,9 +3,9 @@ source: target-spec-miette/tests/datatest-snapshot/expr.rs expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" snapshot_kind: text --- - ร— error parsing cfg() expression + ร— error parsing cfg() expression โ•ญโ”€โ”€โ”€โ”€ - 1 โ”‚ cfg(target_os = none) - ยท โ”€โ”€โ”ฌโ”€ - ยท โ•ฐโ”€โ”€ expected a `"` here + 1 โ”‚ cfg(target_os = none) + ยท  โ”€โ”€โ”ฌโ”€ + ยท โ•ฐโ”€โ”€ expected a `"` here โ•ฐโ”€โ”€โ”€โ”€