| | @@ -570,16 +570,31 @@ |
| 570 | 570 | test th1-anoncap-no-$perm-1 {$RESULT eq {0}} |
| 571 | 571 | |
| 572 | 572 | run_in_checkout { |
| 573 | 573 | fossil test-th-eval --set-user-caps "anycap $perm" |
| 574 | 574 | test th1-anycap-yes-$perm-1 {$RESULT eq {1}} |
| 575 | + |
| 576 | + set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission. |
| 577 | + fossil test-th-eval --set-user-caps "anycap $perm" |
| 578 | + test th1-anycap-no-$perm-1 {$RESULT eq {0}} |
| 579 | + unset ::env(TH1_TEST_USER_CAPS) |
| 575 | 580 | |
| 576 | 581 | fossil test-th-eval --set-user-caps "hascap $perm" |
| 577 | 582 | test th1-hascap-yes-$perm-1 {$RESULT eq {1}} |
| 583 | + |
| 584 | + set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission. |
| 585 | + fossil test-th-eval --set-user-caps "hascap $perm" |
| 586 | + test th1-hascap-no-$perm-1 {$RESULT eq {0}} |
| 587 | + unset ::env(TH1_TEST_USER_CAPS) |
| 578 | 588 | |
| 579 | 589 | fossil test-th-eval --set-anon-caps "anoncap $perm" |
| 580 | 590 | test th1-anoncap-yes-$perm-1 {$RESULT eq {1}} |
| 591 | + |
| 592 | + set ::env(TH1_TEST_ANON_CAPS) 1; # NOTE: Bad permission. |
| 593 | + fossil test-th-eval --set-anon-caps "anoncap $perm" |
| 594 | + test th1-anoncap-no-$perm-1 {$RESULT eq {0}} |
| 595 | + unset ::env(TH1_TEST_ANON_CAPS) |
| 581 | 596 | } |
| 582 | 597 | } |
| 583 | 598 | |
| 584 | 599 | ############################################################################### |
| 585 | 600 | |
| | @@ -609,22 +624,47 @@ |
| 609 | 624 | ############################################################################### |
| 610 | 625 | |
| 611 | 626 | run_in_checkout { |
| 612 | 627 | fossil test-th-eval --set-user-caps "anycap oh" |
| 613 | 628 | test th1-anycap-yes-multiple-1 {$RESULT eq {1}} |
| 629 | + |
| 630 | + set ::env(TH1_TEST_USER_CAPS) o |
| 631 | + fossil test-th-eval --set-user-caps "anycap oh" |
| 632 | + test th1-anycap-yes-multiple-2 {$RESULT eq {1}} |
| 633 | + unset ::env(TH1_TEST_USER_CAPS) |
| 614 | 634 | |
| 615 | 635 | fossil test-th-eval --set-user-caps "hascap oh" |
| 616 | 636 | test th1-hascap-yes-multiple-1 {$RESULT eq {1}} |
| 637 | + |
| 638 | + set ::env(TH1_TEST_USER_CAPS) o |
| 639 | + fossil test-th-eval --set-user-caps "hascap oh" |
| 640 | + test th1-hascap-no-multiple-3 {$RESULT eq {0}} |
| 641 | + unset ::env(TH1_TEST_USER_CAPS) |
| 617 | 642 | |
| 618 | 643 | fossil test-th-eval --set-user-caps "hascap o h" |
| 619 | 644 | test th1-hascap-yes-multiple-2 {$RESULT eq {1}} |
| 645 | + |
| 646 | + set ::env(TH1_TEST_USER_CAPS) o |
| 647 | + fossil test-th-eval --set-user-caps "hascap o h" |
| 648 | + test th1-hascap-no-multiple-4 {$RESULT eq {0}} |
| 649 | + unset ::env(TH1_TEST_USER_CAPS) |
| 620 | 650 | |
| 621 | 651 | fossil test-th-eval --set-anon-caps "anoncap oh" |
| 622 | 652 | test th1-anoncap-yes-multiple-1 {$RESULT eq {1}} |
| 653 | + |
| 654 | + set ::env(TH1_TEST_ANON_CAPS) o |
| 655 | + fossil test-th-eval --set-anon-caps "anoncap oh" |
| 656 | + test th1-anoncap-no-multiple-3 {$RESULT eq {0}} |
| 657 | + unset ::env(TH1_TEST_ANON_CAPS) |
| 623 | 658 | |
| 624 | 659 | fossil test-th-eval --set-anon-caps "anoncap o h" |
| 625 | 660 | test th1-anoncap-yes-multiple-2 {$RESULT eq {1}} |
| 661 | + |
| 662 | + set ::env(TH1_TEST_ANON_CAPS) o |
| 663 | + fossil test-th-eval --set-anon-caps "anoncap o h" |
| 664 | + test th1-anoncap-no-multiple-4 {$RESULT eq {0}} |
| 665 | + unset ::env(TH1_TEST_ANON_CAPS) |
| 626 | 666 | } |
| 627 | 667 | |
| 628 | 668 | ############################################################################### |
| 629 | 669 | |
| 630 | 670 | run_in_checkout { |
| 631 | 671 | |