Browse Source

Stable test

master
Adrian Heine 1 year ago
parent
commit
9694ed0138
  1. 10
      src/symbols/git/checkout.rs

10
src/symbols/git/checkout.rs

@ -136,14 +136,20 @@ mod test {
let start = Instant::now();
assert!(run(checkout.target_reached()).unwrap());
let end = Instant::now();
let mut args = c.args.into_inner();
let first_two_args = &mut args[0..2];
first_two_args.sort_unstable();
assert_eq!(
c.args.into_inner(),
first_two_args,
[
["-C", "target", "fetch", "source", "branch"],
["-C", "target", "rev-list", "-1", "HEAD"],
["-C", "target", "rev-list", "-1", "FETCH_HEAD"]
]
);
drop(first_two_args);
assert_eq!(args[2],
["-C", "target", "rev-list", "-1", "FETCH_HEAD"]);
assert!((end - start).as_millis() >= 100);
assert!((end - start).as_millis() < 150);
}

Loading…
Cancel
Save