diff options
author | Russ Allbery <rra@stanford.edu> | 2010-06-29 15:38:31 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-06-29 15:38:31 -0700 |
commit | 906f0f88d64c4df501c2b84dbf6b7102de36d491 (patch) | |
tree | 904ee92db1b107e0ae42aec3132b92d9ac3bef08 /tests | |
parent | cd98777eb7904c30f1ffa792e10472e9b7b5051b (diff) |
Update test suite for the addition of krb5-regex
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/server/backend-t | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/server/backend-t b/tests/server/backend-t index b58d02c..a618391 100755 --- a/tests/server/backend-t +++ b/tests/server/backend-t @@ -289,11 +289,19 @@ for my $command (sort keys %acl_commands) { my @args = @base; $args[$arg] = 'foo;bar'; ($out, $err) = run_backend ('acl', $command, @args); - is ($err, "invalid characters in argument: foo;bar\n", - "Invalid arguments for acl $command $arg"); - is ($OUTPUT, "error for admin (1.2.3.4): invalid characters in" - . " argument: foo;bar\n", ' and syslog correct'); - is ($out, "$new\n", ' and nothing ran'); + if (($command eq 'add' or $command eq 'remove') and $arg == 2) { + is ($err, '', 'Add/remove allows any characters'); + is ($OUTPUT, "command acl $command @args[0..2] from admin" + . " (1.2.3.4) succeeded\n", ' and success logged'); + is ($out, "$new\nacl_$command @args[0..2]\n", + ' and calls the right method'); + } else { + is ($err, "invalid characters in argument: foo;bar\n", + "Invalid arguments for acl $command $arg"); + is ($OUTPUT, "error for admin (1.2.3.4): invalid characters in" + . " argument: foo;bar\n", ' and syslog correct'); + is ($out, "$new\n", ' and nothing ran'); + } } } for my $command (sort keys %flag_commands) { |