We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 108f5a5 commit a8a349dCopy full SHA for a8a349d
1 file changed
src/normal_path.rs
@@ -183,3 +183,22 @@ impl ValueParserFactory for NormalPath {
183
Self::Parser::default()
184
}
185
186
+
187
+#[cfg(test)]
188
+mod tests {
189
+ use std::env;
190
191
+ use super::*;
192
193
+ #[test]
194
+ fn test_into_absolute() {
195
+ let dir = env::temp_dir();
196
+ let path_buf = Utf8PathBuf::from_path_buf(dir.clone()).unwrap();
197
+ let test_path = NormalPath {
198
+ normal: path_buf,
199
+ relative: None,
200
+ };
201
202
+ assert_eq!(test_path.into_absolute().as_os_str(), dir.as_os_str());
203
+ }
204
+}
0 commit comments