From: Nick Porter Date: Thu, 24 Jul 2025 13:57:33 +0000 (+0100) Subject: Test use of local variable to reference index in map list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65a72cd3fd24130258bb8b0595d50aa9979659e9;p=thirdparty%2Ffreeradius-server.git Test use of local variable to reference index in map list --- diff --git a/src/tests/keywords/map-list b/src/tests/keywords/map-list index 2b2be61ac8..e11ae8a367 100644 --- a/src/tests/keywords/map-list +++ b/src/tests/keywords/map-list @@ -2,6 +2,7 @@ string result0 string result1 string result2 string result3 +integer index map list %str.split('one two three', ' ') { result0 := 0 @@ -14,4 +15,13 @@ if ((result0 != 'one') || (result1 != 'two') || (result2 != 'three') || result3) test_fail } +index := 1 +map list %str.split('foo baa baz', ' ') { + result1 := index +} + +if (result1 != 'baa') { + test_fail +} + success