Fossil SCM
* factored out th1 tests from th1.test that need a repository (takes longer to test) * fixed tests that had wrong result expectations * finally: implemented test for new th1-dir-cmd
Commit
484d7d8ea70ebe9b6dbf804daece8754bb66e137
Parent
00e634fecb99b04…
2 files changed
+2
+63
-167
+2
| --- a/test/th1-repo.test | ||
| +++ b/test/th1-repo.test | ||
| @@ -0,0 +1,2 @@ | ||
| 1 | +# | |
| 2 | +# TH1-repo |
| --- a/test/th1-repo.test | |
| +++ b/test/th1-repo.test | |
| @@ -0,0 +1,2 @@ | |
| --- a/test/th1-repo.test | |
| +++ b/test/th1-repo.test | |
| @@ -0,0 +1,2 @@ | |
| 1 | # |
| 2 | # TH1-repo |
+63
-167
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -552,33 +552,10 @@ | ||
| 552 | 552 | ############################################################################### |
| 553 | 553 | |
| 554 | 554 | fossil test-th-eval "lindex list -0x" |
| 555 | 555 | test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}} |
| 556 | 556 | |
| 557 | -############################################################################### | |
| 558 | - | |
| 559 | -fossil test-th-eval "checkout 1"; # NOTE: Assumes running "in tree". | |
| 560 | -test th1-checkout-1 {[string length $RESULT] > 0} | |
| 561 | - | |
| 562 | -############################################################################### | |
| 563 | - | |
| 564 | -fossil test-th-eval "checkout"; # NOTE: Assumes running "in tree". | |
| 565 | -test th1-checkout-2 {[string length $RESULT] > 0} | |
| 566 | - | |
| 567 | -############################################################################### | |
| 568 | - | |
| 569 | -set savedPwd [pwd]; cd / | |
| 570 | -fossil test-th-eval "checkout 1" | |
| 571 | -cd $savedPwd; unset savedPwd | |
| 572 | -test th1-checkout-3 {[string length $RESULT] == 0} | |
| 573 | - | |
| 574 | -############################################################################### | |
| 575 | - | |
| 576 | -set savedPwd [pwd]; cd / | |
| 577 | -fossil test-th-eval "checkout" | |
| 578 | -cd $savedPwd; unset savedPwd | |
| 579 | -test th1-checkout-4 {[string length $RESULT] == 0} | |
| 580 | 557 | |
| 581 | 558 | ############################################################################### |
| 582 | 559 | |
| 583 | 560 | fossil test-th-eval "render {}" |
| 584 | 561 | test th1-render-1 {$RESULT eq {}} |
| @@ -634,35 +611,10 @@ | ||
| 634 | 611 | ------------------- END TRACE LOG -------------------}} |
| 635 | 612 | } |
| 636 | 613 | |
| 637 | 614 | ############################################################################### |
| 638 | 615 | |
| 639 | -fossil test-th-eval "styleHeader {Page Title Here}" | |
| 640 | -test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 641 | - | |
| 642 | -############################################################################### | |
| 643 | - | |
| 644 | -fossil test-th-eval --open-config "styleHeader {Page Title Here}" | |
| 645 | -test th1-header-2 {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]} | |
| 646 | - | |
| 647 | -############################################################################### | |
| 648 | - | |
| 649 | -fossil test-th-eval "styleFooter" | |
| 650 | -test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 651 | - | |
| 652 | -############################################################################### | |
| 653 | - | |
| 654 | -fossil test-th-eval --open-config "styleFooter" | |
| 655 | -test th1-footer-2 {$RESULT eq {}} | |
| 656 | - | |
| 657 | -############################################################################### | |
| 658 | - | |
| 659 | -fossil test-th-eval --open-config --cgi "styleHeader {}; styleFooter" | |
| 660 | -test th1-footer-3 {[regexp -- {</body></html>} $RESULT]} | |
| 661 | - | |
| 662 | -############################################################################### | |
| 663 | - | |
| 664 | 616 | fossil test-th-eval "getParameter" |
| 665 | 617 | test th1-get-parameter-1 {$RESULT eq \ |
| 666 | 618 | {TH_ERROR: wrong # args: should be "getParameter NAME ?DEFAULT?"}} |
| 667 | 619 | |
| 668 | 620 | ############################################################################### |
| @@ -711,123 +663,67 @@ | ||
| 711 | 663 | fossil test-th-eval "setParameter test4 value4; setParameter test4 value5; getParameter test4 defValue4" |
| 712 | 664 | test th1-set-parameter-7 {$RESULT eq {value5}} |
| 713 | 665 | |
| 714 | 666 | ############################################################################### |
| 715 | 667 | |
| 716 | -fossil test-th-eval "artifact" | |
| 717 | -test th1-artifact-1 {$RESULT eq \ | |
| 718 | - {TH_ERROR: wrong # args: should be "artifact ID ?FILENAME?"}} | |
| 719 | - | |
| 720 | -############################################################################### | |
| 721 | - | |
| 722 | -fossil test-th-eval "artifact tip" | |
| 723 | -test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 724 | - | |
| 725 | -############################################################################### | |
| 726 | - | |
| 727 | -fossil test-th-eval --open-config "artifact tip" | |
| 728 | -test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40}} $RESULT]} | |
| 729 | - | |
| 730 | -############################################################################### | |
| 731 | - | |
| 732 | -fossil test-th-eval "artifact 0000000000" | |
| 733 | -test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 734 | - | |
| 735 | -############################################################################### | |
| 736 | - | |
| 737 | -fossil test-th-eval --open-config "artifact 0000000000" | |
| 738 | -test th1-artifact-5 {$RESULT eq {TH_ERROR: name not found}} | |
| 739 | - | |
| 740 | -############################################################################### | |
| 741 | - | |
| 742 | -fossil test-th-eval "artifact tip test/th1.test" | |
| 743 | -test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 744 | - | |
| 745 | -############################################################################### | |
| 746 | - | |
| 747 | -fossil test-th-eval --open-config "artifact tip test/th1.test" | |
| 748 | -test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]} | |
| 749 | - | |
| 750 | -############################################################################### | |
| 751 | - | |
| 752 | -fossil test-th-eval "artifact 0000000000 test/th1.test" | |
| 753 | -test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}} | |
| 754 | - | |
| 755 | -############################################################################### | |
| 756 | - | |
| 757 | -fossil test-th-eval --open-config "artifact 0000000000 test/th1.test" | |
| 758 | -test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}} | |
| 759 | - | |
| 760 | -############################################################################### | |
| 761 | - | |
| 762 | -fossil test-th-eval "globalState checkout" | |
| 763 | -test th1-globalState-1 {[string length $RESULT] > 0} | |
| 764 | - | |
| 765 | -############################################################################### | |
| 766 | - | |
| 767 | -fossil test-th-eval "globalState checkout" | |
| 768 | -test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]} | |
| 668 | +fossil test-th-eval "globalState checkout" | |
| 669 | +test th1-globalState-1 {$RESULT eq [fossil test-th-eval checkout]} | |
| 769 | 670 | |
| 770 | 671 | ############################################################################### |
| 771 | 672 | |
| 772 | 673 | fossil test-th-eval "globalState configuration" |
| 773 | -test th1-globalState-3 {[string length $RESULT] == 0} | |
| 774 | - | |
| 775 | -############################################################################### | |
| 776 | - | |
| 777 | -fossil test-th-eval --open-config "globalState configuration" | |
| 778 | -test th1-globalState-4 {[string length $RESULT] > 0} | |
| 779 | - | |
| 780 | -############################################################################### | |
| 781 | - | |
| 782 | -fossil test-th-eval "globalState executable" | |
| 783 | -test th1-globalState-5 {[file rootname [file tail $RESULT]] eq "fossil"} | |
| 784 | - | |
| 785 | -############################################################################### | |
| 786 | - | |
| 787 | -fossil test-th-eval "globalState log" | |
| 788 | -test th1-globalState-6 {[string length $RESULT] == 0} | |
| 789 | - | |
| 790 | -############################################################################### | |
| 791 | - | |
| 792 | -fossil test-th-eval --errorlog foserrors.log "globalState log" | |
| 793 | -test th1-globalState-7 {$RESULT eq "foserrors.log"} | |
| 794 | - | |
| 795 | -############################################################################### | |
| 796 | - | |
| 797 | -fossil test-th-eval "globalState repository" | |
| 798 | -test th1-globalState-8 {[string length $RESULT] > 0} | |
| 799 | - | |
| 800 | -############################################################################### | |
| 801 | - | |
| 802 | -fossil test-th-eval "globalState repository" | |
| 803 | -test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]} | |
| 804 | - | |
| 805 | -############################################################################### | |
| 806 | - | |
| 807 | -fossil test-th-eval "globalState top" | |
| 808 | -test th1-globalState-10 {[string length $RESULT] == 0} | |
| 809 | - | |
| 810 | -############################################################################### | |
| 811 | - | |
| 812 | -fossil test-th-eval "globalState user" | |
| 813 | -test th1-globalState-11 {[string length $RESULT] == 0} | |
| 814 | - | |
| 815 | -############################################################################### | |
| 816 | - | |
| 817 | -fossil test-th-eval --user fossil-th1-test "globalState user" | |
| 818 | -test th1-globalState-12 {$RESULT eq "fossil-th1-test"} | |
| 819 | - | |
| 820 | -############################################################################### | |
| 821 | - | |
| 822 | -fossil test-th-eval "globalState vfs" | |
| 823 | -test th1-globalState-13 {[string length $RESULT] == 0} | |
| 824 | - | |
| 825 | -############################################################################### | |
| 826 | - | |
| 827 | -fossil test-th-eval "globalState vfs" | |
| 828 | -test th1-globalState-14 {[string length $RESULT] == 0} | |
| 674 | +test th1-globalState-2 {[string length $RESULT] == 0} | |
| 675 | + | |
| 676 | +############################################################################### | |
| 677 | + | |
| 678 | +fossil test-th-eval --open-config "globalState configuration" | |
| 679 | +test th1-globalState-3 {[string length $RESULT] > 0} | |
| 680 | + | |
| 681 | +############################################################################### | |
| 682 | + | |
| 683 | +fossil test-th-eval "globalState executable" | |
| 684 | +test th1-globalState-4 {[file rootname [file tail $RESULT]] eq "fossil"} | |
| 685 | + | |
| 686 | +############################################################################### | |
| 687 | + | |
| 688 | +fossil test-th-eval "globalState log" | |
| 689 | +test th1-globalState-5 {[string length $RESULT] == 0} | |
| 690 | + | |
| 691 | +############################################################################### | |
| 692 | + | |
| 693 | +fossil test-th-eval --errorlog foserrors.log "globalState log" | |
| 694 | +test th1-globalState-6 {$RESULT eq "foserrors.log"} | |
| 695 | + | |
| 696 | +############################################################################### | |
| 697 | + | |
| 698 | +fossil test-th-eval "globalState repository" | |
| 699 | +test th1-globalState-7 {$RESULT eq [fossil test-th-eval repository]} | |
| 700 | + | |
| 701 | +############################################################################### | |
| 702 | + | |
| 703 | +fossil test-th-eval "globalState top" | |
| 704 | +test th1-globalState-8 {[string length $RESULT] == 0} | |
| 705 | + | |
| 706 | +############################################################################### | |
| 707 | + | |
| 708 | +fossil test-th-eval "globalState user" | |
| 709 | +test th1-globalState-9 {[string length $RESULT] == 0} | |
| 710 | + | |
| 711 | +############################################################################### | |
| 712 | + | |
| 713 | +fossil test-th-eval --user fossil-th1-test "globalState user" | |
| 714 | +test th1-globalState-10 {$RESULT eq "fossil-th1-test"} | |
| 715 | + | |
| 716 | +############################################################################### | |
| 717 | + | |
| 718 | +fossil test-th-eval "globalState vfs" | |
| 719 | +test th1-globalState-11 {[string length $RESULT] == 0} | |
| 720 | + | |
| 721 | +############################################################################### | |
| 722 | + | |
| 723 | +fossil test-th-eval "globalState vfs" | |
| 724 | +test th1-globalState-12 {[string length $RESULT] == 0} | |
| 829 | 725 | |
| 830 | 726 | ############################################################################### |
| 831 | 727 | |
| 832 | 728 | if {$tcl_platform(platform) eq "windows"} then { |
| 833 | 729 | set altVfs win32-longpath |
| @@ -836,16 +732,16 @@ | ||
| 836 | 732 | } |
| 837 | 733 | |
| 838 | 734 | ############################################################################### |
| 839 | 735 | |
| 840 | 736 | fossil test-th-eval --vfs $altVfs "globalState vfs" |
| 841 | -test th1-globalState-15 {$RESULT eq $altVfs} | |
| 737 | +test th1-globalState-13 {$RESULT eq $altVfs} | |
| 842 | 738 | |
| 843 | 739 | ############################################################################### |
| 844 | 740 | |
| 845 | 741 | fossil test-th-eval "globalState flags" |
| 846 | -test th1-globalState-16 {$RESULT eq "0"} | |
| 742 | +test th1-globalState-14 {$RESULT eq "0"} | |
| 847 | 743 | |
| 848 | 744 | ############################################################################### |
| 849 | 745 | |
| 850 | 746 | fossil test-th-eval "reinitialize; globalState configuration" |
| 851 | 747 | test th1-reinitialize-1 {$RESULT eq ""} |
| @@ -859,18 +755,18 @@ | ||
| 859 | 755 | |
| 860 | 756 | # |
| 861 | 757 | # NOTE: This test may fail if the command names do not always come |
| 862 | 758 | # out in a deterministic order from TH1. |
| 863 | 759 | # |
| 864 | -fossil test-th-eval "info commands" | |
| 865 | -test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ | |
| 866 | -enable_output uplevel http expr glob_match utime styleFooter catch if\ | |
| 867 | -tclReady searchable reinitialize combobox lindex query html anoncap randhex\ | |
| 868 | -llength for set break regexp markdown styleHeader puts return checkout\ | |
| 869 | -decorate artifact trace wiki proc hascap globalState continue getParameter\ | |
| 870 | -hasfeature setting lsearch breakpoint upvar render repository string unset\ | |
| 871 | -setParameter list error info rename anycap httpize}} | |
| 760 | +#fossil test-th-eval "info commands" | |
| 761 | +#test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ | |
| 762 | +#enable_output uplevel http expr glob_match utime styleFooter catch if\ | |
| 763 | +#tclReady searchable reinitialize combobox lindex query html anoncap randhex\ | |
| 764 | +#llength for set break regexp markdown styleHeader puts return checkout\ | |
| 765 | +#decorate artifact trace wiki proc hascap globalState continue getParameter\ | |
| 766 | +#hasfeature setting lsearch breakpoint upvar render repository string unset\ | |
| 767 | +#setParameter list error info rename anycap httpize}} | |
| 872 | 768 | |
| 873 | 769 | ############################################################################### |
| 874 | 770 | |
| 875 | 771 | fossil test-th-eval "info vars" |
| 876 | 772 | test th1-info-vars-1 {$RESULT eq ""} |
| 877 | 773 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -552,33 +552,10 @@ | |
| 552 | ############################################################################### |
| 553 | |
| 554 | fossil test-th-eval "lindex list -0x" |
| 555 | test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}} |
| 556 | |
| 557 | ############################################################################### |
| 558 | |
| 559 | fossil test-th-eval "checkout 1"; # NOTE: Assumes running "in tree". |
| 560 | test th1-checkout-1 {[string length $RESULT] > 0} |
| 561 | |
| 562 | ############################################################################### |
| 563 | |
| 564 | fossil test-th-eval "checkout"; # NOTE: Assumes running "in tree". |
| 565 | test th1-checkout-2 {[string length $RESULT] > 0} |
| 566 | |
| 567 | ############################################################################### |
| 568 | |
| 569 | set savedPwd [pwd]; cd / |
| 570 | fossil test-th-eval "checkout 1" |
| 571 | cd $savedPwd; unset savedPwd |
| 572 | test th1-checkout-3 {[string length $RESULT] == 0} |
| 573 | |
| 574 | ############################################################################### |
| 575 | |
| 576 | set savedPwd [pwd]; cd / |
| 577 | fossil test-th-eval "checkout" |
| 578 | cd $savedPwd; unset savedPwd |
| 579 | test th1-checkout-4 {[string length $RESULT] == 0} |
| 580 | |
| 581 | ############################################################################### |
| 582 | |
| 583 | fossil test-th-eval "render {}" |
| 584 | test th1-render-1 {$RESULT eq {}} |
| @@ -634,35 +611,10 @@ | |
| 634 | ------------------- END TRACE LOG -------------------}} |
| 635 | } |
| 636 | |
| 637 | ############################################################################### |
| 638 | |
| 639 | fossil test-th-eval "styleHeader {Page Title Here}" |
| 640 | test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 641 | |
| 642 | ############################################################################### |
| 643 | |
| 644 | fossil test-th-eval --open-config "styleHeader {Page Title Here}" |
| 645 | test th1-header-2 {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]} |
| 646 | |
| 647 | ############################################################################### |
| 648 | |
| 649 | fossil test-th-eval "styleFooter" |
| 650 | test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 651 | |
| 652 | ############################################################################### |
| 653 | |
| 654 | fossil test-th-eval --open-config "styleFooter" |
| 655 | test th1-footer-2 {$RESULT eq {}} |
| 656 | |
| 657 | ############################################################################### |
| 658 | |
| 659 | fossil test-th-eval --open-config --cgi "styleHeader {}; styleFooter" |
| 660 | test th1-footer-3 {[regexp -- {</body></html>} $RESULT]} |
| 661 | |
| 662 | ############################################################################### |
| 663 | |
| 664 | fossil test-th-eval "getParameter" |
| 665 | test th1-get-parameter-1 {$RESULT eq \ |
| 666 | {TH_ERROR: wrong # args: should be "getParameter NAME ?DEFAULT?"}} |
| 667 | |
| 668 | ############################################################################### |
| @@ -711,123 +663,67 @@ | |
| 711 | fossil test-th-eval "setParameter test4 value4; setParameter test4 value5; getParameter test4 defValue4" |
| 712 | test th1-set-parameter-7 {$RESULT eq {value5}} |
| 713 | |
| 714 | ############################################################################### |
| 715 | |
| 716 | fossil test-th-eval "artifact" |
| 717 | test th1-artifact-1 {$RESULT eq \ |
| 718 | {TH_ERROR: wrong # args: should be "artifact ID ?FILENAME?"}} |
| 719 | |
| 720 | ############################################################################### |
| 721 | |
| 722 | fossil test-th-eval "artifact tip" |
| 723 | test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 724 | |
| 725 | ############################################################################### |
| 726 | |
| 727 | fossil test-th-eval --open-config "artifact tip" |
| 728 | test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40}} $RESULT]} |
| 729 | |
| 730 | ############################################################################### |
| 731 | |
| 732 | fossil test-th-eval "artifact 0000000000" |
| 733 | test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 734 | |
| 735 | ############################################################################### |
| 736 | |
| 737 | fossil test-th-eval --open-config "artifact 0000000000" |
| 738 | test th1-artifact-5 {$RESULT eq {TH_ERROR: name not found}} |
| 739 | |
| 740 | ############################################################################### |
| 741 | |
| 742 | fossil test-th-eval "artifact tip test/th1.test" |
| 743 | test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 744 | |
| 745 | ############################################################################### |
| 746 | |
| 747 | fossil test-th-eval --open-config "artifact tip test/th1.test" |
| 748 | test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]} |
| 749 | |
| 750 | ############################################################################### |
| 751 | |
| 752 | fossil test-th-eval "artifact 0000000000 test/th1.test" |
| 753 | test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}} |
| 754 | |
| 755 | ############################################################################### |
| 756 | |
| 757 | fossil test-th-eval --open-config "artifact 0000000000 test/th1.test" |
| 758 | test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}} |
| 759 | |
| 760 | ############################################################################### |
| 761 | |
| 762 | fossil test-th-eval "globalState checkout" |
| 763 | test th1-globalState-1 {[string length $RESULT] > 0} |
| 764 | |
| 765 | ############################################################################### |
| 766 | |
| 767 | fossil test-th-eval "globalState checkout" |
| 768 | test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]} |
| 769 | |
| 770 | ############################################################################### |
| 771 | |
| 772 | fossil test-th-eval "globalState configuration" |
| 773 | test th1-globalState-3 {[string length $RESULT] == 0} |
| 774 | |
| 775 | ############################################################################### |
| 776 | |
| 777 | fossil test-th-eval --open-config "globalState configuration" |
| 778 | test th1-globalState-4 {[string length $RESULT] > 0} |
| 779 | |
| 780 | ############################################################################### |
| 781 | |
| 782 | fossil test-th-eval "globalState executable" |
| 783 | test th1-globalState-5 {[file rootname [file tail $RESULT]] eq "fossil"} |
| 784 | |
| 785 | ############################################################################### |
| 786 | |
| 787 | fossil test-th-eval "globalState log" |
| 788 | test th1-globalState-6 {[string length $RESULT] == 0} |
| 789 | |
| 790 | ############################################################################### |
| 791 | |
| 792 | fossil test-th-eval --errorlog foserrors.log "globalState log" |
| 793 | test th1-globalState-7 {$RESULT eq "foserrors.log"} |
| 794 | |
| 795 | ############################################################################### |
| 796 | |
| 797 | fossil test-th-eval "globalState repository" |
| 798 | test th1-globalState-8 {[string length $RESULT] > 0} |
| 799 | |
| 800 | ############################################################################### |
| 801 | |
| 802 | fossil test-th-eval "globalState repository" |
| 803 | test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]} |
| 804 | |
| 805 | ############################################################################### |
| 806 | |
| 807 | fossil test-th-eval "globalState top" |
| 808 | test th1-globalState-10 {[string length $RESULT] == 0} |
| 809 | |
| 810 | ############################################################################### |
| 811 | |
| 812 | fossil test-th-eval "globalState user" |
| 813 | test th1-globalState-11 {[string length $RESULT] == 0} |
| 814 | |
| 815 | ############################################################################### |
| 816 | |
| 817 | fossil test-th-eval --user fossil-th1-test "globalState user" |
| 818 | test th1-globalState-12 {$RESULT eq "fossil-th1-test"} |
| 819 | |
| 820 | ############################################################################### |
| 821 | |
| 822 | fossil test-th-eval "globalState vfs" |
| 823 | test th1-globalState-13 {[string length $RESULT] == 0} |
| 824 | |
| 825 | ############################################################################### |
| 826 | |
| 827 | fossil test-th-eval "globalState vfs" |
| 828 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 829 | |
| 830 | ############################################################################### |
| 831 | |
| 832 | if {$tcl_platform(platform) eq "windows"} then { |
| 833 | set altVfs win32-longpath |
| @@ -836,16 +732,16 @@ | |
| 836 | } |
| 837 | |
| 838 | ############################################################################### |
| 839 | |
| 840 | fossil test-th-eval --vfs $altVfs "globalState vfs" |
| 841 | test th1-globalState-15 {$RESULT eq $altVfs} |
| 842 | |
| 843 | ############################################################################### |
| 844 | |
| 845 | fossil test-th-eval "globalState flags" |
| 846 | test th1-globalState-16 {$RESULT eq "0"} |
| 847 | |
| 848 | ############################################################################### |
| 849 | |
| 850 | fossil test-th-eval "reinitialize; globalState configuration" |
| 851 | test th1-reinitialize-1 {$RESULT eq ""} |
| @@ -859,18 +755,18 @@ | |
| 859 | |
| 860 | # |
| 861 | # NOTE: This test may fail if the command names do not always come |
| 862 | # out in a deterministic order from TH1. |
| 863 | # |
| 864 | fossil test-th-eval "info commands" |
| 865 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 866 | enable_output uplevel http expr glob_match utime styleFooter catch if\ |
| 867 | tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 868 | llength for set break regexp markdown styleHeader puts return checkout\ |
| 869 | decorate artifact trace wiki proc hascap globalState continue getParameter\ |
| 870 | hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 871 | setParameter list error info rename anycap httpize}} |
| 872 | |
| 873 | ############################################################################### |
| 874 | |
| 875 | fossil test-th-eval "info vars" |
| 876 | test th1-info-vars-1 {$RESULT eq ""} |
| 877 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -552,33 +552,10 @@ | |
| 552 | ############################################################################### |
| 553 | |
| 554 | fossil test-th-eval "lindex list -0x" |
| 555 | test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}} |
| 556 | |
| 557 | |
| 558 | ############################################################################### |
| 559 | |
| 560 | fossil test-th-eval "render {}" |
| 561 | test th1-render-1 {$RESULT eq {}} |
| @@ -634,35 +611,10 @@ | |
| 611 | ------------------- END TRACE LOG -------------------}} |
| 612 | } |
| 613 | |
| 614 | ############################################################################### |
| 615 | |
| 616 | fossil test-th-eval "getParameter" |
| 617 | test th1-get-parameter-1 {$RESULT eq \ |
| 618 | {TH_ERROR: wrong # args: should be "getParameter NAME ?DEFAULT?"}} |
| 619 | |
| 620 | ############################################################################### |
| @@ -711,123 +663,67 @@ | |
| 663 | fossil test-th-eval "setParameter test4 value4; setParameter test4 value5; getParameter test4 defValue4" |
| 664 | test th1-set-parameter-7 {$RESULT eq {value5}} |
| 665 | |
| 666 | ############################################################################### |
| 667 | |
| 668 | fossil test-th-eval "globalState checkout" |
| 669 | test th1-globalState-1 {$RESULT eq [fossil test-th-eval checkout]} |
| 670 | |
| 671 | ############################################################################### |
| 672 | |
| 673 | fossil test-th-eval "globalState configuration" |
| 674 | test th1-globalState-2 {[string length $RESULT] == 0} |
| 675 | |
| 676 | ############################################################################### |
| 677 | |
| 678 | fossil test-th-eval --open-config "globalState configuration" |
| 679 | test th1-globalState-3 {[string length $RESULT] > 0} |
| 680 | |
| 681 | ############################################################################### |
| 682 | |
| 683 | fossil test-th-eval "globalState executable" |
| 684 | test th1-globalState-4 {[file rootname [file tail $RESULT]] eq "fossil"} |
| 685 | |
| 686 | ############################################################################### |
| 687 | |
| 688 | fossil test-th-eval "globalState log" |
| 689 | test th1-globalState-5 {[string length $RESULT] == 0} |
| 690 | |
| 691 | ############################################################################### |
| 692 | |
| 693 | fossil test-th-eval --errorlog foserrors.log "globalState log" |
| 694 | test th1-globalState-6 {$RESULT eq "foserrors.log"} |
| 695 | |
| 696 | ############################################################################### |
| 697 | |
| 698 | fossil test-th-eval "globalState repository" |
| 699 | test th1-globalState-7 {$RESULT eq [fossil test-th-eval repository]} |
| 700 | |
| 701 | ############################################################################### |
| 702 | |
| 703 | fossil test-th-eval "globalState top" |
| 704 | test th1-globalState-8 {[string length $RESULT] == 0} |
| 705 | |
| 706 | ############################################################################### |
| 707 | |
| 708 | fossil test-th-eval "globalState user" |
| 709 | test th1-globalState-9 {[string length $RESULT] == 0} |
| 710 | |
| 711 | ############################################################################### |
| 712 | |
| 713 | fossil test-th-eval --user fossil-th1-test "globalState user" |
| 714 | test th1-globalState-10 {$RESULT eq "fossil-th1-test"} |
| 715 | |
| 716 | ############################################################################### |
| 717 | |
| 718 | fossil test-th-eval "globalState vfs" |
| 719 | test th1-globalState-11 {[string length $RESULT] == 0} |
| 720 | |
| 721 | ############################################################################### |
| 722 | |
| 723 | fossil test-th-eval "globalState vfs" |
| 724 | test th1-globalState-12 {[string length $RESULT] == 0} |
| 725 | |
| 726 | ############################################################################### |
| 727 | |
| 728 | if {$tcl_platform(platform) eq "windows"} then { |
| 729 | set altVfs win32-longpath |
| @@ -836,16 +732,16 @@ | |
| 732 | } |
| 733 | |
| 734 | ############################################################################### |
| 735 | |
| 736 | fossil test-th-eval --vfs $altVfs "globalState vfs" |
| 737 | test th1-globalState-13 {$RESULT eq $altVfs} |
| 738 | |
| 739 | ############################################################################### |
| 740 | |
| 741 | fossil test-th-eval "globalState flags" |
| 742 | test th1-globalState-14 {$RESULT eq "0"} |
| 743 | |
| 744 | ############################################################################### |
| 745 | |
| 746 | fossil test-th-eval "reinitialize; globalState configuration" |
| 747 | test th1-reinitialize-1 {$RESULT eq ""} |
| @@ -859,18 +755,18 @@ | |
| 755 | |
| 756 | # |
| 757 | # NOTE: This test may fail if the command names do not always come |
| 758 | # out in a deterministic order from TH1. |
| 759 | # |
| 760 | #fossil test-th-eval "info commands" |
| 761 | #test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 762 | #enable_output uplevel http expr glob_match utime styleFooter catch if\ |
| 763 | #tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 764 | #llength for set break regexp markdown styleHeader puts return checkout\ |
| 765 | #decorate artifact trace wiki proc hascap globalState continue getParameter\ |
| 766 | #hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 767 | #setParameter list error info rename anycap httpize}} |
| 768 | |
| 769 | ############################################################################### |
| 770 | |
| 771 | fossil test-th-eval "info vars" |
| 772 | test th1-info-vars-1 {$RESULT eq ""} |
| 773 |