# This file tests the behaviour of expressions

function expressions.simple {
    bob = 1+1
}

test: unit function expressions.simple {
    "StdoutMatch": "",
    "ExitNum":     0
}

function expressions.simple2 {
    bob = 1+1
    echo $bob
}

test: unit function expressions.simple2 {
    "StdoutMatch": "2\n",
    "ExitNum":     0
}

##### basic

function exp.space.brace {
    out bob;bob =(1+1);out $bob
}

test: unit function exp.space.brace {
    "StdoutMatch": "bob\n2\n",
    "ExitNum":     0
}

function exp.space.nobrace {
    out bob;bob =1+1;out $bob
}

test: unit function exp.space.nobrace {
    "StdoutMatch": "bob\n2\n",
    "ExitNum":     0
}

##### no space

function exp.nospace.brace {
    out bob;bob=(1+1);out $bob
}

test: unit function exp.nospace.brace {
    "StdoutMatch": "bob\n2\n",
    "ExitNum":     0
}

function exp.nospace.nobrace {
    out bob;bob=1+1;out $bob
}

test: unit function exp.nospace.nobrace {
    "StdoutMatch": "bob\n2\n",
    "ExitNum":     0
}