test: Fix flaky eval_state_value_attrs_names_example

(cherry picked from commit 4583b422038661de02c6fe672559d2519f38dfce)
This commit is contained in:
Robert Hensing 2024-12-02 14:08:03 +01:00
parent 76b92a577d
commit 8a437b71a0

View file

@ -785,7 +785,7 @@ mod tests {
let mut es = EvalState::new(store, []).unwrap();
let expr = r#"{ a = throw "nope a"; b = throw "nope b"; }"#;
let v = es.eval_from_string(expr, "<test>").unwrap();
let attrs = es.require_attrs_names_unsorted(&v).unwrap();
let attrs = es.require_attrs_names(&v).unwrap();
assert_eq!(attrs.len(), 2);
assert_eq!(attrs[0], "a");
assert_eq!(attrs[1], "b");