--- /dev/null
+#
+# Input packet
+#
+Packet-Type = Access-Request
+User-Name = "groups_fall_through"
+User-Password = "secret"
+NAS-IP-Address = "1.2.3.4"
+
+#
+# Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == "Hello Fallthrough User"
--- /dev/null
+#
+# Clear out old data
+#
+string groupname
+
+%sql("DELETE FROM radgroupcheck WHERE groupname = 'fallthrough_group_a'")
+%sql("DELETE FROM radgroupcheck WHERE groupname = 'fallthrough_group_b'")
+%sql("DELETE FROM radgroupcheck WHERE groupname = 'fallthrough_group_c'")
+
+%sql("DELETE FROM radgroupreply WHERE groupname = 'fallthrough_group_a'")
+%sql("DELETE FROM radgroupreply WHERE groupname = 'fallthrough_group_b'")
+%sql("DELETE FROM radgroupreply WHERE groupname = 'fallthrough_group_c'")
+
+%sql("DELETE FROM radusergroup WHERE username = 'groups_fall_through'")
+
+#
+# Insert new test data
+#
+%sql("INSERT INTO radusergroup (username, groupname, priority) VALUES ('groups_fall_through', 'fallthrough_group_a', 1010)")
+%sql("INSERT INTO radusergroup (username, groupname, priority) VALUES ('groups_fall_through', 'fallthrough_group_b', 1020)")
+%sql("INSERT INTO radusergroup (username, groupname, priority) VALUES ('groups_fall_through', 'fallthrough_group_c', 1030)")
+
+%sql("INSERT INTO radgroupcheck (groupname, attribute, op, value) VALUES ('fallthrough_group_a', 'Password.Cleartext', ':=', 'UserAPassword')")
+%sql("INSERT INTO radgroupcheck (groupname, attribute, op, value) VALUES ('fallthrough_group_b', 'Password.Cleartext', ':=', 'secret')")
+
+%sql("INSERT INTO radgroupreply (groupname, attribute, op, value) VALUES ('fallthrough_group_a', 'Reply-Message', ':=', 'Hello User A')")
+%sql("INSERT INTO radgroupreply (groupname, attribute, op, value) VALUES ('fallthrough_group_a', 'Fall-Through', '=', 'yes')")
+%sql("INSERT INTO radgroupreply (groupname, attribute, op, value) VALUES ('fallthrough_group_b', 'Reply-Message', ':=', 'Hello Fallthrough User')")
+%sql("INSERT INTO radgroupreply (groupname, attribute, op, value) VALUES ('fallthrough_group_c', 'Reply-Message', ':=', 'Hello User B')")
+
+#
+# Run SQL
+#
+sql
+if (!updated) {
+ test_fail
+}
+
+if !(&control.Password.Cleartext == &User-Password) {
+ test_fail
+}
+
+if !(&reply.Reply-Message == "Hello Fallthrough User") {
+ test_fail
+}
+
+test_pass
--- /dev/null
+#
+# Input packet
+#
+Packet-Type = Access-Request
+User-Name = "groups_no_fall_through"
+User-Password = "topsecret"
+NAS-IP-Address = "1.2.3.4"
+
+#
+# Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == "Hello No-Fallthrough User"
--- /dev/null
+#
+# Clear out old data
+#
+string groupname
+
+%sql("${delete_from_radcheck} 'groups_no_fall_through'")
+%sql("${delete_from_radreply} 'groups_no_fall_through'")
+
+%sql("DELETE FROM radgroupcheck WHERE groupname = 'nofallthrough_group'")
+%sql("DELETE FROM radgroupreply WHERE groupname = 'nofallthrough_group'")
+
+%sql("DELETE FROM radusergroup WHERE username = 'groups_no_fall_through'")
+
+#
+# Insert new test data
+#
+%sql("${insert_into_radcheck} ('groups_no_fall_through', 'Password.Cleartext', ':=', 'topsecret')")
+%sql("${insert_into_radreply} ('groups_no_fall_through', 'Reply-Message', ':=', 'Hello No-Fallthrough User')")
+%sql("${insert_into_radreply} ('groups_no_fall_through', 'Fall-Through', ':=', 'no')")
+%sql("INSERT INTO radusergroup (username, groupname, priority) VALUES ('groups_no_fall_through', 'fallthrough_group', 1010)")
+%sql("INSERT INTO radgroupcheck (groupname, attribute, op, value) VALUES ('nofallthrough_group', 'Password.Cleartext', ':=', 'UserAPassword')")
+%sql("INSERT INTO radgroupreply (groupname, attribute, op, value) VALUES ('nofallthrough_group', 'Reply-Message', ':=', 'Hello User A')")
+
+#
+# Run SQL
+#
+sql
+if (!ok) {
+ test_fail
+}
+
+if !(&control.Password.Cleartext == &User-Password) {
+ test_fail
+}
+
+if !(&reply.Reply-Message == "Hello No-Fallthrough User") {
+ test_fail
+}
+
+test_pass
--- /dev/null
+../sql/groups_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_fall_through.unlang
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.unlang
\ No newline at end of file
--- /dev/null
+../sql/groups_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_fall_through.unlang
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.unlang
\ No newline at end of file
--- /dev/null
+../sql/groups_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_fall_through.unlang
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.attrs
\ No newline at end of file
--- /dev/null
+../sql/groups_no_fall_through.unlang
\ No newline at end of file