···
1
1
+
---
2
2
+
source: compiler-core/src/error/tests.rs
3
3
+
expression: error
4
4
+
---
5
5
+
error: File IO failure
6
6
+
7
7
+
An error occurred while trying to copy this directory to /dest:
8
8
+
9
9
+
/src
10
10
+
11
11
+
The error message from the file IO library was:
12
12
+
13
13
+
Critical error!
···
1
1
+
---
2
2
+
source: compiler-core/src/error/tests.rs
3
3
+
expression: error
4
4
+
---
5
5
+
error: File IO failure
6
6
+
7
7
+
An error occurred while trying to delete this file:
8
8
+
9
9
+
/file
10
10
+
11
11
+
The error message from the file IO library was:
12
12
+
13
13
+
Critical error!
···
1
1
+
---
2
2
+
source: compiler-core/src/error/tests.rs
3
3
+
expression: error
4
4
+
---
5
5
+
error: File IO failure
6
6
+
7
7
+
An error occurred while trying to link this file to /dest:
8
8
+
9
9
+
/src
10
10
+
11
11
+
The error message from the file IO library was:
12
12
+
13
13
+
Critical error!
···
53
53
Error::HexSessionRevoked
54
54
);
55
55
}
56
56
+
57
57
+
fn io_link_file_error() {
58
58
+
let error = Error::FileIo {
59
59
+
kind: FileKind::File,
60
60
+
action: FileIoAction::Link("/dest".into()),
61
61
+
path: "/src".into(),
62
62
+
err: Some("Critical error!".to_owned()),
63
63
+
}
64
64
+
.pretty_string();
65
65
+
assert_snapshot!(error);
66
66
+
}
67
67
+
68
68
+
#[test]
69
69
+
fn io_copy_directory_error() {
70
70
+
let error = Error::FileIo {
71
71
+
kind: FileKind::Directory,
72
72
+
action: FileIoAction::Copy("/dest".into()),
73
73
+
path: "/src".into(),
74
74
+
err: Some("Critical error!".to_owned()),
75
75
+
}
76
76
+
.pretty_string();
77
77
+
assert_snapshot!(error);
78
78
+
}
79
79
+
80
80
+
#[test]
81
81
+
fn io_delete_file_error() {
82
82
+
let error = Error::FileIo {
83
83
+
kind: FileKind::File,
84
84
+
action: FileIoAction::Delete,
85
85
+
path: "/file".into(),
86
86
+
err: Some("Critical error!".to_owned()),
87
87
+
}
88
88
+
.pretty_string();
89
89
+
assert_snapshot!(error);
90
90
+
}