···
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 canonicalise 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 create this directory:
8
8
+
9
9
+
/dir
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 find the parent of this directory:
8
8
+
9
9
+
/dir
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 open 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 parse 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 read 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 read metadata of 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 update permissions of 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 write to 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!
···
88
88
.pretty_string();
89
89
assert_snapshot!(error);
90
90
}
91
91
+
92
92
+
#[test]
93
93
+
fn io_open_file_error() {
94
94
+
let error = Error::FileIo {
95
95
+
kind: FileKind::File,
96
96
+
action: FileIoAction::Open,
97
97
+
path: "/file".into(),
98
98
+
err: Some("Critical error!".to_owned()),
99
99
+
}
100
100
+
.pretty_string();
101
101
+
assert_snapshot!(error);
102
102
+
}
103
103
+
104
104
+
#[test]
105
105
+
fn io_parse_file_error() {
106
106
+
let error = Error::FileIo {
107
107
+
kind: FileKind::File,
108
108
+
action: FileIoAction::Parse,
109
109
+
path: "/file".into(),
110
110
+
err: Some("Critical error!".to_owned()),
111
111
+
}
112
112
+
.pretty_string();
113
113
+
assert_snapshot!(error);
114
114
+
}
115
115
+
116
116
+
#[test]
117
117
+
fn io_read_file_error() {
118
118
+
let error = Error::FileIo {
119
119
+
kind: FileKind::File,
120
120
+
action: FileIoAction::Read,
121
121
+
path: "/file".into(),
122
122
+
err: Some("Critical error!".to_owned()),
123
123
+
}
124
124
+
.pretty_string();
125
125
+
assert_snapshot!(error);
126
126
+
}
127
127
+
128
128
+
#[test]
129
129
+
fn io_create_directory_error() {
130
130
+
let error = Error::FileIo {
131
131
+
kind: FileKind::Directory,
132
132
+
action: FileIoAction::Create,
133
133
+
path: "/dir".into(),
134
134
+
err: Some("Critical error!".to_owned()),
135
135
+
}
136
136
+
.pretty_string();
137
137
+
assert_snapshot!(error);
138
138
+
}
139
139
+
140
140
+
#[test]
141
141
+
fn io_write_to_file_error() {
142
142
+
let error = Error::FileIo {
143
143
+
kind: FileKind::File,
144
144
+
action: FileIoAction::WriteTo,
145
145
+
path: "/file".into(),
146
146
+
err: Some("Critical error!".to_owned()),
147
147
+
}
148
148
+
.pretty_string();
149
149
+
assert_snapshot!(error);
150
150
+
}
151
151
+
152
152
+
#[test]
153
153
+
fn io_find_parent_of_directory_error() {
154
154
+
let error = Error::FileIo {
155
155
+
kind: FileKind::Directory,
156
156
+
action: FileIoAction::FindParent,
157
157
+
path: "/dir".into(),
158
158
+
err: Some("Critical error!".to_owned()),
159
159
+
}
160
160
+
.pretty_string();
161
161
+
assert_snapshot!(error);
162
162
+
}
163
163
+
164
164
+
#[test]
165
165
+
fn io_canonicalise_file_error() {
166
166
+
let error = Error::FileIo {
167
167
+
kind: FileKind::File,
168
168
+
action: FileIoAction::Canonicalise,
169
169
+
path: "/file".into(),
170
170
+
err: Some("Critical error!".to_owned()),
171
171
+
}
172
172
+
.pretty_string();
173
173
+
assert_snapshot!(error);
174
174
+
}
175
175
+
176
176
+
#[test]
177
177
+
fn io_update_file_permissions_error() {
178
178
+
let error = Error::FileIo {
179
179
+
kind: FileKind::File,
180
180
+
action: FileIoAction::UpdatePermissions,
181
181
+
path: "/file".into(),
182
182
+
err: Some("Critical error!".to_owned()),
183
183
+
}
184
184
+
.pretty_string();
185
185
+
assert_snapshot!(error);
186
186
+
}
187
187
+
188
188
+
#[test]
189
189
+
fn io_read_metadata_of_file_error() {
190
190
+
let error = Error::FileIo {
191
191
+
kind: FileKind::File,
192
192
+
action: FileIoAction::ReadMetadata,
193
193
+
path: "/file".into(),
194
194
+
err: Some("Critical error!".to_owned()),
195
195
+
}
196
196
+
.pretty_string();
197
197
+
assert_snapshot!(error);
198
198
+
}