Skip to content

Commit

Permalink
update snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian authored and sharkdp committed Oct 17, 2021
1 parent 3a3cd0a commit 2339d78
Show file tree
Hide file tree
Showing 34 changed files with 408 additions and 374 deletions.
1 change: 1 addition & 0 deletions tests/snapshots/output/changes.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
+ /// A rectangle. First line is changed to prevent a regression of #1869
struct Rectangle {
width: u32,
height: u32,
Expand Down
1 change: 1 addition & 0 deletions tests/snapshots/output/changes_grid.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
──┬─────────────────────────────────────────────────────────────────────────────
+ │ /// A rectangle. First line is changed to prevent a regression of #1869
│ struct Rectangle {
│ width: u32,
│ height: u32,
Expand Down
1 change: 1 addition & 0 deletions tests/snapshots/output/changes_grid_header.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
──┬─────────────────────────────────────────────────────────────────────────────
│ File: sample.rs
──┼─────────────────────────────────────────────────────────────────────────────
+ │ /// A rectangle. First line is changed to prevent a regression of #1869
│ struct Rectangle {
│ width: u32,
│ height: u32,
Expand Down
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_grid_header_numbers.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
───────┬────────────────────────────────────────────────────────────────────────
│ File: sample.rs
───────┼────────────────────────────────────────────────────────────────────────
1 │ struct Rectangle {
2 │ width: u32,
3 │ height: u32,
4 │ }
5 │
6 _ │ fn main() {
7 │ let rect1 = Rectangle { width: 30, height: 50 };
8 │
9 │ println!(
10 ~ │ "The perimeter of the rectangle is {} pixels.",
11 ~ │ perimeter(&rect1)
12 │ );
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
14 │ }
15 │
16 │ fn area(rectangle: &Rectangle) -> u32 {
17 │ rectangle.width * rectangle.height
18 │ }
19 + │
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
21 + │ (rectangle.width + rectangle.height) * 2
22 + │ }
1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
2 │ struct Rectangle {
3 │ width: u32,
4 │ height: u32,
5 │ }
6 │
7 _ │ fn main() {
8 │ let rect1 = Rectangle { width: 30, height: 50 };
9 │
10 │ println!(
11 ~ │ "The perimeter of the rectangle is {} pixels.",
12 ~ │ perimeter(&rect1)
13 │ );
14 + │ println!(r#"This line contains invalid utf8: "�����"#;
15 │ }
16 │
17 │ fn area(rectangle: &Rectangle) -> u32 {
18 │ rectangle.width * rectangle.height
19 │ }
20 + │
21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22 + │ (rectangle.width + rectangle.height) * 2
23 + │ }
───────┴────────────────────────────────────────────────────────────────────────
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
───────┬────────────────────────────────────────────────────────────────────────
│ File: sample.rs
───────┼────────────────────────────────────────────────────────────────────────
1 │ struct Rectangle {
2 │ width: u32,
3 │ height: u32,
4 │ }
5 │
6 _ │ fn main() {
7 │ let rect1 = Rectangle { width: 30, height: 50 };
8 │
9 │ println!(
10 ~ │ "The perimeter of the rectangle is {} pixels.",
11 ~ │ perimeter(&rect1)
12 │ );
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
14 │ }
15 │
16 │ fn area(rectangle: &Rectangle) -> u32 {
17 │ rectangle.width * rectangle.height
18 │ }
19 + │
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
21 + │ (rectangle.width + rectangle.height) * 2
22 + │ }
1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
2 │ struct Rectangle {
3 │ width: u32,
4 │ height: u32,
5 │ }
6 │
7 _ │ fn main() {
8 │ let rect1 = Rectangle { width: 30, height: 50 };
9 │
10 │ println!(
11 ~ │ "The perimeter of the rectangle is {} pixels.",
12 ~ │ perimeter(&rect1)
13 │ );
14 + │ println!(r#"This line contains invalid utf8: "�����"#;
15 │ }
16 │
17 │ fn area(rectangle: &Rectangle) -> u32 {
18 │ rectangle.width * rectangle.height
19 │ }
20 + │
21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22 + │ (rectangle.width + rectangle.height) * 2
23 + │ }
───────┴────────────────────────────────────────────────────────────────────────
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
──┬─────────────────────────────────────────────────────────────────────────────
│ File: sample.rs
──┼─────────────────────────────────────────────────────────────────────────────
+ │ /// A rectangle. First line is changed to prevent a regression of #1869
│ struct Rectangle {
│ width: u32,
│ height: u32,
Expand Down
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_grid_numbers.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
───────┬────────────────────────────────────────────────────────────────────────
1 │ struct Rectangle {
2 │ width: u32,
3 │ height: u32,
4 │ }
5 │
6 _ │ fn main() {
7 │ let rect1 = Rectangle { width: 30, height: 50 };
8 │
9 │ println!(
10 ~ │ "The perimeter of the rectangle is {} pixels.",
11 ~ │ perimeter(&rect1)
12 │ );
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
14 │ }
15 │
16 │ fn area(rectangle: &Rectangle) -> u32 {
17 │ rectangle.width * rectangle.height
18 │ }
19 + │
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
21 + │ (rectangle.width + rectangle.height) * 2
22 + │ }
1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
2 │ struct Rectangle {
3 │ width: u32,
4 │ height: u32,
5 │ }
6 │
7 _ │ fn main() {
8 │ let rect1 = Rectangle { width: 30, height: 50 };
9 │
10 │ println!(
11 ~ │ "The perimeter of the rectangle is {} pixels.",
12 ~ │ perimeter(&rect1)
13 │ );
14 + │ println!(r#"This line contains invalid utf8: "�����"#;
15 │ }
16 │
17 │ fn area(rectangle: &Rectangle) -> u32 {
18 │ rectangle.width * rectangle.height
19 │ }
20 + │
21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22 + │ (rectangle.width + rectangle.height) * 2
23 + │ }
───────┴────────────────────────────────────────────────────────────────────────
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
───────┬────────────────────────────────────────────────────────────────────────
1 │ struct Rectangle {
2 │ width: u32,
3 │ height: u32,
4 │ }
5 │
6 _ │ fn main() {
7 │ let rect1 = Rectangle { width: 30, height: 50 };
8 │
9 │ println!(
10 ~ │ "The perimeter of the rectangle is {} pixels.",
11 ~ │ perimeter(&rect1)
12 │ );
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
14 │ }
15 │
16 │ fn area(rectangle: &Rectangle) -> u32 {
17 │ rectangle.width * rectangle.height
18 │ }
19 + │
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
21 + │ (rectangle.width + rectangle.height) * 2
22 + │ }
1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
2 │ struct Rectangle {
3 │ width: u32,
4 │ height: u32,
5 │ }
6 │
7 _ │ fn main() {
8 │ let rect1 = Rectangle { width: 30, height: 50 };
9 │
10 │ println!(
11 ~ │ "The perimeter of the rectangle is {} pixels.",
12 ~ │ perimeter(&rect1)
13 │ );
14 + │ println!(r#"This line contains invalid utf8: "�����"#;
15 │ }
16 │
17 │ fn area(rectangle: &Rectangle) -> u32 {
18 │ rectangle.width * rectangle.height
19 │ }
20 + │
21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22 + │ (rectangle.width + rectangle.height) * 2
23 + │ }
───────┴────────────────────────────────────────────────────────────────────────
1 change: 1 addition & 0 deletions tests/snapshots/output/changes_grid_rule.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
──┬─────────────────────────────────────────────────────────────────────────────
+ │ /// A rectangle. First line is changed to prevent a regression of #1869
│ struct Rectangle {
│ width: u32,
│ height: u32,
Expand Down
1 change: 1 addition & 0 deletions tests/snapshots/output/changes_header.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
File: sample.rs
+ /// A rectangle. First line is changed to prevent a regression of #1869
struct Rectangle {
width: u32,
height: u32,
Expand Down
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_header_numbers.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
File: sample.rs
1 struct Rectangle {
2 width: u32,
3 height: u32,
4 }
5
6 _ fn main() {
7 let rect1 = Rectangle { width: 30, height: 50 };
8
9 println!(
10 ~ "The perimeter of the rectangle is {} pixels.",
11 ~ perimeter(&rect1)
12 );
13 + println!(r#"This line contains invalid utf8: "�����"#;
14 }
15
16 fn area(rectangle: &Rectangle) -> u32 {
17 rectangle.width * rectangle.height
18 }
19 +
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
21 + (rectangle.width + rectangle.height) * 2
22 + }
1 + /// A rectangle. First line is changed to prevent a regression of #1869
2 struct Rectangle {
3 width: u32,
4 height: u32,
5 }
6
7 _ fn main() {
8 let rect1 = Rectangle { width: 30, height: 50 };
9
10 println!(
11 ~ "The perimeter of the rectangle is {} pixels.",
12 ~ perimeter(&rect1)
13 );
14 + println!(r#"This line contains invalid utf8: "�����"#;
15 }
16
17 fn area(rectangle: &Rectangle) -> u32 {
18 rectangle.width * rectangle.height
19 }
20 +
21 + fn perimeter(rectangle: &Rectangle) -> u32 {
22 + (rectangle.width + rectangle.height) * 2
23 + }
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_header_numbers_rule.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
File: sample.rs
1 struct Rectangle {
2 width: u32,
3 height: u32,
4 }
5
6 _ fn main() {
7 let rect1 = Rectangle { width: 30, height: 50 };
8
9 println!(
10 ~ "The perimeter of the rectangle is {} pixels.",
11 ~ perimeter(&rect1)
12 );
13 + println!(r#"This line contains invalid utf8: "�����"#;
14 }
15
16 fn area(rectangle: &Rectangle) -> u32 {
17 rectangle.width * rectangle.height
18 }
19 +
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
21 + (rectangle.width + rectangle.height) * 2
22 + }
1 + /// A rectangle. First line is changed to prevent a regression of #1869
2 struct Rectangle {
3 width: u32,
4 height: u32,
5 }
6
7 _ fn main() {
8 let rect1 = Rectangle { width: 30, height: 50 };
9
10 println!(
11 ~ "The perimeter of the rectangle is {} pixels.",
12 ~ perimeter(&rect1)
13 );
14 + println!(r#"This line contains invalid utf8: "�����"#;
15 }
16
17 fn area(rectangle: &Rectangle) -> u32 {
18 rectangle.width * rectangle.height
19 }
20 +
21 + fn perimeter(rectangle: &Rectangle) -> u32 {
22 + (rectangle.width + rectangle.height) * 2
23 + }
1 change: 1 addition & 0 deletions tests/snapshots/output/changes_header_rule.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
File: sample.rs
+ /// A rectangle. First line is changed to prevent a regression of #1869
struct Rectangle {
width: u32,
height: u32,
Expand Down
45 changes: 23 additions & 22 deletions tests/snapshots/output/changes_numbers.snapshot.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
1 struct Rectangle {
2 width: u32,
3 height: u32,
4 }
5
6 _ fn main() {
7 let rect1 = Rectangle { width: 30, height: 50 };
8
9 println!(
10 ~ "The perimeter of the rectangle is {} pixels.",
11 ~ perimeter(&rect1)
12 );
13 + println!(r#"This line contains invalid utf8: "�����"#;
14 }
15
16 fn area(rectangle: &Rectangle) -> u32 {
17 rectangle.width * rectangle.height
18 }
19 +
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
21 + (rectangle.width + rectangle.height) * 2
22 + }
1 + /// A rectangle. First line is changed to prevent a regression of #1869
2 struct Rectangle {
3 width: u32,
4 height: u32,
5 }
6
7 _ fn main() {
8 let rect1 = Rectangle { width: 30, height: 50 };
9
10 println!(
11 ~ "The perimeter of the rectangle is {} pixels.",
12 ~ perimeter(&rect1)
13 );
14 + println!(r#"This line contains invalid utf8: "�����"#;
15 }
16
17 fn area(rectangle: &Rectangle) -> u32 {
18 rectangle.width * rectangle.height
19 }
20 +
21 + fn perimeter(rectangle: &Rectangle) -> u32 {
22 + (rectangle.width + rectangle.height) * 2
23 + }
Loading

0 comments on commit 2339d78

Please sign in to comment.