| 1 |
# |
| 2 |
# Test if the "users" file works |
| 3 |
# |
| 4 |
|
| 5 |
|
| 6 |
# |
| 7 |
# Basic syntax tests with comments. Parsing only. |
| 8 |
# |
| 9 |
|
| 10 |
user Cleartext-Password := "hello" # comment! |
| 11 |
|
| 12 |
|
| 13 |
user2 # comment! |
| 14 |
Reply-Message := "24" |
| 15 |
|
| 16 |
|
| 17 |
# |
| 18 |
# Setting ":=" of reply and control items |
| 19 |
# |
| 20 |
|
| 21 |
bob Cleartext-Password := "hello" |
| 22 |
Reply-Message := "success" |
| 23 |
|
| 24 |
|
| 25 |
# |
| 26 |
# Detect erroneous Fall-Through |
| 27 |
# |
| 28 |
|
| 29 |
doug Cleartext-Password := "goodbye" |
| 30 |
Reply-Message := "success" |
| 31 |
|
| 32 |
doug |
| 33 |
Reply-Message := "unreachable" |
| 34 |
|
| 35 |
|
| 36 |
# |
| 37 |
# Fall-Through across a non-matching entry |
| 38 |
# |
| 39 |
|
| 40 |
famous Cleartext-Password := "bradpitt" |
| 41 |
Fall-Through = yes |
| 42 |
|
| 43 |
unused Cleartext-Password := "jabberwocky" |
| 44 |
Reply-Message := "fail" |
| 45 |
|
| 46 |
famous |
| 47 |
Reply-Message := "success" |
| 48 |
|
| 49 |
|
| 50 |
# |
| 51 |
# Modification of the reply list |
| 52 |
# |
| 53 |
|
| 54 |
addreply Cleartext-Password := "testing123" |
| 55 |
Reply-Message := "success1", |
| 56 |
Fall-Through = yes |
| 57 |
|
| 58 |
addreply |
| 59 |
Reply-Message += "success2" |
| 60 |
|
| 61 |
|
| 62 |
subreply Cleartext-Password := "testing123" |
| 63 |
Reply-Message := "success1", |
| 64 |
Reply-Message += "success2", |
| 65 |
Reply-Message += "success3", |
| 66 |
Fall-Through = yes |
| 67 |
|
| 68 |
subreply Cleartext-Password := "testing123" |
| 69 |
Reply-Message -= "success2" |
| 70 |
|
| 71 |
|
| 72 |
filterreply Cleartext-Password := "testing123" |
| 73 |
Reply-Message := "success1", |
| 74 |
Reply-Message += "success2", |
| 75 |
Fall-Through = yes |
| 76 |
|
| 77 |
filterreply Cleartext-Password := "testing123" |
| 78 |
Reply-Message !* ANY |
| 79 |
|
| 80 |
|
| 81 |
# |
| 82 |
# Addition "+=" to the control list |
| 83 |
# |
| 84 |
# Note: Set ":=" of control items is already tested with Cleartext-Password |
| 85 |
# Note: Filtering "!*" does not apply to control items as this would overload |
| 86 |
# the operator syntax since "!*" checks that no such attribute in the |
| 87 |
# request. |
| 88 |
|
| 89 |
addcontrol Cleartext-Password := "testing123", Reply-Message := "success1" |
| 90 |
Fall-Through = yes |
| 91 |
|
| 92 |
addcontrol Reply-Message += "success2" |
| 93 |
|
| 94 |
|
| 95 |
# |
| 96 |
# Doesn't match |
| 97 |
# |
| 98 |
DEFAULT Framed-IP-Address == 192.0.2.1 |
| 99 |
Reply-Message += "unexpected match in DEFAULT" |
| 100 |
|
| 101 |
DEFAULT |
| 102 |
Reply-Message = "empty DEFAULT" |