File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,10 @@ fn permission_test() {
262
262
// apparmor
263
263
#[ cfg( feature = "apparmor" ) ]
264
264
pass ! ( [ "ALL ALL=(ALL:ALL) APPARMOR_PROFILE=unconfined ALL" ] , "user" => root( ) , "server" ; "/bin/bar" => [ apparmor_profile: Some ( "unconfined" . to_string( ) ) ] ) ;
265
+
266
+ // list
267
+ pass ! ( [ "ALL ALL=(ALL:ALL) /bin/ls, list" ] , "user" => root( ) , "server" ; "list" ) ;
268
+ FAIL ! ( [ "ALL ALL=(ALL:ALL) ALL, !list" ] , "user" => root( ) , "server" ; "list" ) ;
265
269
}
266
270
267
271
#[ test]
@@ -385,6 +389,12 @@ fn sudoedit_recognized() {
385
389
assert_eq ! ( args. unwrap( ) . as_ref( ) , & [ "/etc/tmux.conf" ] [ ..] ) ;
386
390
}
387
391
392
+ #[ test]
393
+ #[ should_panic = "list does not take arguments" ]
394
+ fn list_does_not_take_args ( ) {
395
+ parse_eval :: < ast:: CommandSpec > ( "list /etc/tmux.conf" ) ;
396
+ }
397
+
388
398
#[ test]
389
399
fn directive_test ( ) {
390
400
let y = parse_eval :: < Spec < UserSpecifier > > ;
You can’t perform that action at this time.
0 commit comments