From: Nick Porter Date: Thu, 24 Jul 2025 11:16:08 +0000 (+0100) Subject: Test handling of FR_TYPE_NULL in map list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47477e7d7a7727efd045f92048d18820cdaa1f64;p=thirdparty%2Ffreeradius-server.git Test handling of FR_TYPE_NULL in map list --- diff --git a/src/tests/modules/redis/xlat.unlang b/src/tests/modules/redis/xlat.unlang index 70ca7cbfe0..15febb85dd 100644 --- a/src/tests/modules/redis/xlat.unlang +++ b/src/tests/modules/redis/xlat.unlang @@ -2,6 +2,9 @@ # Call redis commands as xlat # integer dummy_number +string result0 +string result1 +string result3 $INCLUDE cluster_reset.inc %redis('SET', 'value1', 100) @@ -28,4 +31,16 @@ if ((control.Tmp-String-0[0] != 'fooval') || (control.Tmp-String-0[1] != '300') test_fail } +# Use map list to process the result of an xlat, where nil results will be returned. +map list %redis('HMGET', 'hash1', 'foo', 'boink', 'baz') { + result0 := 0 + result1 := 1 + dummy_number := 2 + result3 := 3 +} + +if ((result0 != 'fooval') || result1 || (dummy_number != 300) || result3) { + test_fail +} + test_pass