use slash_lang::parser::ast::Priority;
use slash_lang::parser::parse;

#[test]
fn parses_single_command() {
    let prog = parse("/build.flag(value)").unwrap();
    assert_eq!(prog.pipelines.len(), 1);
    let cmd = &prog.pipelines[0].commands[0];
    assert_eq!(cmd.name, "build");
    assert_eq!(cmd.priority, Priority::Low);
    assert_eq!(cmd.args.len(), 1);
    assert_eq!(cmd.args[0].name, "flag");
    assert_eq!(cmd.args[0].value.as_deref(), Some("value"));
}
