blob: 5f632a880903d3408daa54a2d24bcc00020c1c01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//! Test for `set_extensions`, which writes a global state maintained by libgit2
use git2::opts::{get_extensions, set_extensions};
use git2::Error;
#[test]
fn test_remove_extensions() -> Result<(), Error> {
unsafe {
set_extensions(&["custom", "!ignore", "!noop", "!objectformat", "other"])?;
}
let extensions = unsafe { get_extensions() }?;
assert_eq!(extensions.len(), 2);
assert_eq!(extensions.get(0), Some("custom"));
assert_eq!(extensions.get(1), Some("other"));
Ok(())
}
|