# This file tests flags by running the murex executable

function murex.flag.try.semicolon {
    exec: $MUREX_EXE --try -c (err: "foo"; out "bar") 
}

test: unit function murex.flag.try.semicolon {
    "StderrRegex": "foo",
    "ExitNum":     1
}

function murex.flag.try.pipe {
    exec: $MUREX_EXE --try -c (err: "foo" -> out "bar") 
}

test: unit function murex.flag.try.pipe {
    "StderrRegex": "foo",
    "StdoutRegex": "bar"
}

function murex.flag.try.errpipe {
    exec: $MUREX_EXE --try -c (err: "foo" ? out "bar") 
}

test: unit function murex.flag.try.errpipe {
    "StdoutRegex": "bar"
}

function murex.flag.trypipe.semicolon {
    exec: $MUREX_EXE --trypipe -c (err: "foo"; out "bar") 
}

test: unit function murex.flag.trypipe.semicolon {
    "StderrRegex": "foo",
    "ExitNum":     1
}

function murex.flag.trypipe.pipe {
    exec: $MUREX_EXE --trypipe -c (err: "foo" -> out "bar") 
}

test: unit function murex.flag.trypipe.pipe {
    "StderrRegex": "foo",
    "ExitNum":     1
}

function murex.flag.trypipe.errpipe {
    exec: $MUREX_EXE --trypipe -c (err: "foo" ? out "bar") 
}

test: unit function murex.flag.trypipe.errpipe {
    "StderrRegex": "Error",
    "ExitNum":     1
}