Skip to content

Commit

Permalink
test(task): Add format for comparing Values
Browse files Browse the repository at this point in the history
After upgrading to minijinja 2.3.0, this fails:
```
    #[test]
    fn test_minijinja() {
        let vars = context! {};
        let new_vars = context! {..vars.clone()};
        assert_eq!(vars, new_vars);
  }
```

Signed-off-by: Alexander Gil <[email protected]>
  • Loading branch information
pando85 committed Sep 17, 2024
1 parent 56e34af commit 80f3e59
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rash_core/src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ mod tests {
let expected = context! {
item => 3,
};
assert_eq!(result, expected);
assert_eq!(format!("{}", result), format!("{}", expected));
}

#[test]
Expand Down Expand Up @@ -790,7 +790,7 @@ mod tests {

let vars = context! {};
let result = task.exec(vars.clone()).unwrap();
assert_eq!(result, vars);
assert_eq!(format!("{}", result), format!("{}", vars));
}

#[test]
Expand All @@ -805,8 +805,7 @@ mod tests {

let vars = context! {buu => "boo"};
let result = task.exec(vars.clone()).unwrap();
assert_eq!(result, vars);

assert_eq!(format!("{}", result), format!("{}", vars));
let s0 = r#"
name: task 1
debug:
Expand All @@ -818,7 +817,7 @@ mod tests {

let vars = context! {buu => "boo"};
let result = task.exec(vars.clone()).unwrap();
assert_eq!(result, vars);
assert_eq!(format!("{}", result), format!("{}", vars));
}

#[test]
Expand Down

0 comments on commit 80f3e59

Please sign in to comment.