Skip to content

Commit

Permalink
Add test for list reference in exec output parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Dec 31, 2024
1 parent 835858e commit 5278fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tests/modules/exec/attrs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

echo Filter-Id := $1
echo Callback-Id := \"${CALLED_STATION_ID}\"
echo reply.Filter-Id := $1

exit 0;
5 changes: 5 additions & 0 deletions src/tests/modules/exec/sync.unlang
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if ((!&control.Callback-Id) || (&control.Callback-Id != 'aabbccddeeff')) {
test_fail
}

if ((!&reply.Filter-Id) || (&reply.Filter-Id != 'tony')) {
test_fail
}

#
# Call a module which returns status code 7 - mapped to module exit
# code "notfound". Attributes in its output should be ignored.
Expand All @@ -85,4 +89,5 @@ if !(&control.Filter-Id == 'TONY') {
test_fail
}

&reply -= &Filter-Id[*]
test_pass

0 comments on commit 5278fee

Please sign in to comment.