Skip to content

Commit

Permalink
feat: 支持在条件语句中对不正确的模板用法进行检查
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnotech committed Oct 12, 2023
1 parent 785bbfd commit e0f686a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/types/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,15 @@ fn test_header_valid() {
flow.verify_self(&String::from("./examples/VSCode"))
.unwrap();


let flow=WorkflowHeader{
let flow = WorkflowHeader {
name: Some("Name".to_string()),
step: "Step".to_string(),
c_if: Some("${Arch}==\"X64\"".to_string()),
};

assert!(flow.verify_self(&String::from("./examples/VSCode")).is_err());
assert!(flow
.verify_self(&String::from("./examples/VSCode"))
.is_err());
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
Expand Down

0 comments on commit e0f686a

Please sign in to comment.