1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
use git_testament::{git_testament, git_testament_macros};
git_testament!(TESTAMENT);
git_testament_macros!(TESTAMENT);
const TESTAMENT_BRANCH_NAME_OR_DEFAULT: &str = {
match TESTAMENT.branch_name {
Some(branch_name) => branch_name,
None => "main",
}
};
const MACROS_BRANCH_NAME_OR_DEFAULT: &str = {
match TESTAMENT_branch!() {
Some(branch_name) => branch_name,
None => "main",
}
};
#[test]
fn it_works() {
assert_eq!(
TESTAMENT_BRANCH_NAME_OR_DEFAULT,
MACROS_BRANCH_NAME_OR_DEFAULT
);
}
|