Skip to content

Commit

Permalink
Add QA test for foreach.
Browse files Browse the repository at this point in the history
  • Loading branch information
skids committed Jun 14, 2013
1 parent eee057b commit e0d2342
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/Makefile
Expand Up @@ -18,8 +18,8 @@ export DYLD_LIBRARY_PATH

RADDB_PATH := $(top_builddir)/raddb

TESTS = user_password chap mschapv1 digest-01/digest* test.example.com \
wimax
TESTS = user_password vpiter chap mschapv1 digest-01/digest* \
test.example.com wimax

PORT = 12340
#PORT = 1812
Expand Down
24 changes: 24 additions & 0 deletions src/tests/config/test.conf
Expand Up @@ -35,6 +35,30 @@ authorize {
Test-Server-Port = "%{Packet-Dst-Port}"
}

if (Test-Name == "vpiter") {
update control {
Reply-Message += "one"
Reply-Message += "two"
}
update request {
Reply-Message = "0"
}
foreach control:Reply-Message {
update reply {
Reply-Message += Foreach-Variable-0
}
update request {
Reply-Message := "%{Reply-Message}0"
}
if (Reply-Message == "0000") {
break
}
}
if (Reply-Message == "0000") {
reject
}
}

if (User-Name == "bob") {
#
# Digest-* tests have a password of "zanzibar"
Expand Down

0 comments on commit e0d2342

Please sign in to comment.