From 5278fee59b339fb6674547405f2a76960452905e Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Tue, 31 Dec 2024 11:32:32 +0000 Subject: [PATCH] Add test for list reference in exec output parsing --- src/tests/modules/exec/attrs.sh | 1 + src/tests/modules/exec/sync.unlang | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/tests/modules/exec/attrs.sh b/src/tests/modules/exec/attrs.sh index 727c972671212..b401387b09090 100755 --- a/src/tests/modules/exec/attrs.sh +++ b/src/tests/modules/exec/attrs.sh @@ -2,5 +2,6 @@ echo Filter-Id := $1 echo Callback-Id := \"${CALLED_STATION_ID}\" +echo reply.Filter-Id := $1 exit 0; diff --git a/src/tests/modules/exec/sync.unlang b/src/tests/modules/exec/sync.unlang index f00219d19e6ac..f91b46cf58b40 100644 --- a/src/tests/modules/exec/sync.unlang +++ b/src/tests/modules/exec/sync.unlang @@ -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. @@ -85,4 +89,5 @@ if !(&control.Filter-Id == 'TONY') { test_fail } +&reply -= &Filter-Id[*] test_pass