| | @@ -926,53 +926,53 @@ |
| 926 | 926 | catch if tclReady searchable reinitialize combobox lindex tclIsSafe query\ |
| 927 | 927 | html anoncap randhex llength for set break regexp markdown styleHeader\ |
| 928 | 928 | puts return checkout decorate artifact trace wiki proc tclInvoke hascap\ |
| 929 | 929 | globalState continue getParameter hasfeature setting lsearch breakpoint\ |
| 930 | 930 | upvar render repository string unset setParameter list error info rename\ |
| 931 | | - tclExpr anycap tclEval httpize tclMakeSafe}} |
| 931 | + tclExpr array anycap tclEval httpize tclMakeSafe}} |
| 932 | 932 | } else { |
| 933 | 933 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 934 | 934 | enable_output uplevel dir http expr glob_match utime styleFooter encode64\ |
| 935 | 935 | catch if tclReady searchable reinitialize combobox lindex query html\ |
| 936 | 936 | anoncap randhex llength for set break regexp markdown styleHeader puts\ |
| 937 | 937 | return checkout decorate artifact trace wiki proc hascap globalState\ |
| 938 | 938 | continue getParameter hasfeature setting lsearch breakpoint upvar render\ |
| 939 | | - repository string unset setParameter list error info rename anycap\ |
| 939 | + repository string unset setParameter list error info rename array anycap\ |
| 940 | 940 | httpize}} |
| 941 | 941 | } |
| 942 | 942 | |
| 943 | 943 | ############################################################################### |
| 944 | 944 | |
| 945 | 945 | fossil test-th-eval "info vars" |
| 946 | 946 | |
| 947 | 947 | if {$th1Hooks} { |
| 948 | 948 | test th1-info-vars-1 {$RESULT eq \ |
| 949 | | - "th_stack_trace cmd_flags cmd_name cmd_args"} |
| 949 | + "th_stack_trace cmd_flags tcl_platform cmd_name cmd_args"} |
| 950 | 950 | } else { |
| 951 | | - test th1-info-vars-1 {$RESULT eq ""} |
| 951 | + test th1-info-vars-1 {$RESULT eq "tcl_platform"} |
| 952 | 952 | } |
| 953 | 953 | |
| 954 | 954 | ############################################################################### |
| 955 | 955 | |
| 956 | 956 | fossil test-th-eval "set x 1; info vars" |
| 957 | 957 | |
| 958 | 958 | if {$th1Hooks} { |
| 959 | 959 | test th1-info-vars-2 {$RESULT eq \ |
| 960 | | - "x th_stack_trace cmd_flags cmd_name cmd_args"} |
| 960 | + "x th_stack_trace cmd_flags tcl_platform cmd_name cmd_args"} |
| 961 | 961 | } else { |
| 962 | | - test th1-info-vars-2 {$RESULT eq "x"} |
| 962 | + test th1-info-vars-2 {$RESULT eq "x tcl_platform"} |
| 963 | 963 | } |
| 964 | 964 | |
| 965 | 965 | ############################################################################### |
| 966 | 966 | |
| 967 | 967 | fossil test-th-eval "set x 1; unset x; info vars" |
| 968 | 968 | |
| 969 | 969 | if {$th1Hooks} { |
| 970 | 970 | test th1-info-vars-3 {$RESULT eq \ |
| 971 | | - "th_stack_trace cmd_flags cmd_name cmd_args"} |
| 971 | + "th_stack_trace cmd_flags tcl_platform cmd_name cmd_args"} |
| 972 | 972 | } else { |
| 973 | | - test th1-info-vars-3 {$RESULT eq ""} |
| 973 | + test th1-info-vars-3 {$RESULT eq "tcl_platform"} |
| 974 | 974 | } |
| 975 | 975 | |
| 976 | 976 | ############################################################################### |
| 977 | 977 | |
| 978 | 978 | fossil test-th-eval "proc foo {} {set x 1; info vars}; foo" |
| | @@ -982,14 +982,69 @@ |
| 982 | 982 | |
| 983 | 983 | fossil test-th-eval "set y 1; proc foo {} {set x 1; uplevel 1 {info vars}}; foo" |
| 984 | 984 | |
| 985 | 985 | if {$th1Hooks} { |
| 986 | 986 | test th1-info-vars-5 {$RESULT eq \ |
| 987 | | - "th_stack_trace y cmd_flags cmd_name cmd_args"} |
| 987 | + "th_stack_trace y cmd_flags tcl_platform cmd_name cmd_args"} |
| 988 | 988 | } else { |
| 989 | | - test th1-info-vars-5 {$RESULT eq "y"} |
| 989 | + test th1-info-vars-5 {$RESULT eq "y tcl_platform"} |
| 990 | 990 | } |
| 991 | + |
| 992 | +############################################################################### |
| 993 | + |
| 994 | +fossil test-th-eval "array exists foo" |
| 995 | +test th1-array-exists-1 {$RESULT eq "0"} |
| 996 | + |
| 997 | +############################################################################### |
| 998 | + |
| 999 | +fossil test-th-eval "set foo(x) 1; array exists foo" |
| 1000 | +test th1-array-exists-2 {$RESULT eq "1"} |
| 1001 | + |
| 1002 | +############################################################################### |
| 1003 | + |
| 1004 | +fossil test-th-eval "set foo(x) 1; unset foo(x); array exists foo" |
| 1005 | +test th1-array-exists-3 {$RESULT eq "1"} |
| 1006 | + |
| 1007 | +############################################################################### |
| 1008 | + |
| 1009 | +fossil test-th-eval "set foo(x) 1; unset foo; array exists foo" |
| 1010 | +test th1-array-exists-4 {$RESULT eq "0"} |
| 1011 | + |
| 1012 | +############################################################################### |
| 1013 | + |
| 1014 | +fossil test-th-eval "set foo 1; array exists foo" |
| 1015 | +test th1-array-exists-5 {$RESULT eq "0"} |
| 1016 | + |
| 1017 | +############################################################################### |
| 1018 | + |
| 1019 | +fossil test-th-eval "array names foo" |
| 1020 | +test th1-array-names-1 {$RESULT eq ""} |
| 1021 | + |
| 1022 | +############################################################################### |
| 1023 | + |
| 1024 | +fossil test-th-eval "set foo 2; array names foo" |
| 1025 | +test th1-array-names-2 {$RESULT eq ""} |
| 1026 | + |
| 1027 | +############################################################################### |
| 1028 | + |
| 1029 | +fossil test-th-eval "set foo 2; unset foo; set foo(x) 2; array names foo" |
| 1030 | +test th1-array-names-3 {$RESULT eq "x"} |
| 1031 | + |
| 1032 | +############################################################################### |
| 1033 | + |
| 1034 | +fossil test-th-eval "set foo(x) 2; array names foo" |
| 1035 | +test th1-array-names-4 {$RESULT eq "x"} |
| 1036 | + |
| 1037 | +############################################################################### |
| 1038 | + |
| 1039 | +fossil test-th-eval "set foo(x) 2; set foo(y) 2; array names foo" |
| 1040 | +test th1-array-names-5 {$RESULT eq "x y"} |
| 1041 | + |
| 1042 | +############################################################################### |
| 1043 | + |
| 1044 | +fossil test-th-eval "set foo(x) 2; unset foo(x); array names foo" |
| 1045 | +test th1-array-names-6 {$RESULT eq ""} |
| 991 | 1046 | |
| 992 | 1047 | ############################################################################### |
| 993 | 1048 | |
| 994 | 1049 | fossil test-th-eval "lsearch" |
| 995 | 1050 | test th1-lsearch-1 {$RESULT eq \ |
| | @@ -1361,5 +1416,25 @@ |
| 1361 | 1416 | {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]} |
| 1362 | 1417 | } |
| 1363 | 1418 | |
| 1364 | 1419 | test th1-encode64-3 {$RESULT eq \ |
| 1365 | 1420 | "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="} |
| 1421 | + |
| 1422 | +############################################################################### |
| 1423 | + |
| 1424 | +fossil test-th-eval {array exists tcl_platform} |
| 1425 | +test th1-platform-1 {$RESULT eq "1"} |
| 1426 | + |
| 1427 | +############################################################################### |
| 1428 | + |
| 1429 | +fossil test-th-eval {array names tcl_platform} |
| 1430 | +test th1-platform-2 {$RESULT eq "engine platform"} |
| 1431 | + |
| 1432 | +############################################################################### |
| 1433 | + |
| 1434 | +fossil test-th-eval {set tcl_platform(engine)} |
| 1435 | +test th1-platform-3 {$RESULT eq "TH1"} |
| 1436 | + |
| 1437 | +############################################################################### |
| 1438 | + |
| 1439 | +fossil test-th-eval {set tcl_platform(platform)} |
| 1440 | +test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"} |
| 1366 | 1441 | |