feat(error): stack trace
This commit is contained in:
@@ -313,9 +313,18 @@ fn read_dir_basic() {
|
||||
let result = eval(&expr);
|
||||
|
||||
if let Value::AttrSet(attrs) = result {
|
||||
assert_eq!(attrs.get("file1.txt"), Some(&Value::String("regular".to_string())));
|
||||
assert_eq!(attrs.get("file2.txt"), Some(&Value::String("regular".to_string())));
|
||||
assert_eq!(attrs.get("subdir"), Some(&Value::String("directory".to_string())));
|
||||
assert_eq!(
|
||||
attrs.get("file1.txt"),
|
||||
Some(&Value::String("regular".to_string()))
|
||||
);
|
||||
assert_eq!(
|
||||
attrs.get("file2.txt"),
|
||||
Some(&Value::String("regular".to_string()))
|
||||
);
|
||||
assert_eq!(
|
||||
attrs.get("subdir"),
|
||||
Some(&Value::String("directory".to_string()))
|
||||
);
|
||||
assert_eq!(attrs.len(), 3);
|
||||
} else {
|
||||
panic!("Expected AttrSet, got {:?}", result);
|
||||
@@ -359,4 +368,3 @@ fn read_dir_on_file_fails() {
|
||||
let err_msg = result.unwrap_err().to_string();
|
||||
assert!(err_msg.contains("not a directory"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user