Skip to content

Commit

Permalink
adds tests with numerical operation starting with a negative number
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Oct 22, 2023
1 parent f47a1c0 commit 955938a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/actions/setvar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ func TestSetvarEvaluateErrors(t *testing.T) {
expectInvalidSyntaxError: false,
expectNewVarValue: "-5",
},
{
name: "Numerical operation - with existing negative variable",
init: "TX.newvar=-5",
init2: "TX.newvar=+5",
expectInvalidSyntaxError: false,
expectNewVarValue: "0",
},
{
name: "Numerical operation + with missing (or non-numerical) variable",
init: "TX.newvar=+%{tx.missingvar}",
Expand Down

0 comments on commit 955938a

Please sign in to comment.