Normalize test snapshots (#17486)

This reduces the churn when changing test snapshots, as insta updates
the quotes when the contents change. Instead, we decouple it by updating
the quotes in bulk here.

Created by:

```
cargo insta test --accept --force-update-snapshots
```
This commit is contained in:
konsti
2026-01-15 17:50:10 +01:00
committed by GitHub
parent 3eadf6c1c1
commit 6db2c62906
79 changed files with 9841 additions and 9863 deletions
+12 -12
View File
@@ -287,14 +287,14 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": "value1",
"key2": 42,
"key3": "multi-part string"
}
"###);
"#);
}
#[test]
@@ -314,7 +314,7 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": "value1\"value2\"value3",
@@ -322,7 +322,7 @@ mod tests {
"key3": "value1\\\"value2\\\"value3",
"key4": "value1\\\\value2\\\\value3"
}
"###);
"#);
}
#[test]
@@ -371,14 +371,14 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": "value1",
"key2": 42,
"key3": "multi-part string"
}
"###);
"#);
}
#[test]
@@ -396,13 +396,13 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": 12345,
"key2": -15
}
"###);
"#);
}
#[test]
@@ -420,13 +420,13 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": "value with \"escaped quotes\"",
"key2": "single-quoted 'escaped'"
}
"###);
"#);
}
#[test]
@@ -445,12 +445,12 @@ mod tests {
let result = input.parse::<SysconfigData>().expect("Parsing failed");
let snapshot = result.to_string_pretty().unwrap();
insta::assert_snapshot!(snapshot, @r###"
insta::assert_snapshot!(snapshot, @r#"
# system configuration generated and used by the sysconfig module
build_time_vars = {
"key1": "multi-line string"
}
"###);
"#);
}
#[test]