Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch bug-d5ddbc7f49 Excluding Merge-Ins
This is equivalent to a diff from 37640d60e2 to e94bc46f19
2014-07-15
| ||
15:10 | [726349fab8] Stop leaking compression dictionary on zlib xform channel close. check-in: 4e3d47ad17 user: dgp tags: trunk | |
13:18 | merge trunk Leaf check-in: 6559584842 user: dgp tags: dgp-pkg-migration | |
2014-07-12
| ||
16:15 | merge trunk Leaf check-in: e94bc46f19 user: dkf tags: bug-d5ddbc7f49 | |
16:13 | whopper change; now passes test suite on OSX check-in: 0b38cdbc76 user: dkf tags: bug-d5ddbc7f49 | |
2014-07-11
| ||
20:40 | Suppress valgrind warnings about uninitialized values. check-in: 37640d60e2 user: dgp tags: trunk | |
18:20 | [1211aceef2] Fix refcount management of TclpTempFileName() that caused leak. check-in: 44648f6210 user: dgp tags: trunk | |
Changes to generic/tclAssembly.c.
︙ | |||
1588 1589 1590 1591 1592 1593 1594 | 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 | - + | } if (GetIntegerOperand(assemEnvPtr, &tokenPtr, &opnd) != TCL_OK) { goto cleanup; } if (opnd < 2) { if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, |
︙ | |||
2431 2432 2433 2434 2435 2436 2437 | 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 | - + | CheckNonNegative( Tcl_Interp* interp, /* Tcl interpreter for error reporting */ int value) /* Value to check */ { Tcl_Obj* result; /* Error message */ if (value < 0) { |
︙ | |||
2464 2465 2466 2467 2468 2469 2470 | 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 | - + | CheckStrictlyPositive( Tcl_Interp* interp, /* Tcl interpreter for error reporting */ int value) /* Value to check */ { Tcl_Obj* result; /* Error message */ if (value <= 0) { |
︙ |
Changes to generic/tclCkalloc.c.
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + - + | static int ckallocInit = 0; /* * Prototypes for procedures defined in this file: */ static int CheckmemCmd(ClientData clientData, Tcl_Interp *interp, |
︙ | |||
810 811 812 813 814 815 816 | 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | - + - + + + + + + + + + + - + - - - + + - - - - - - + + + + + + + + + + + - + - - + + - + - + - - + - - - + - - + + - + - + - - + - + - - - + - + + - - + + - + - - - + + - - + + - + - - + - + - - + + - + - - - - + + + - - + - + - - - - - + + - + - - + + - + - - - - - + + - - - + + - | */ /* ARGSUSED */ static int MemoryCmd( ClientData clientData, Tcl_Interp *interp, int argc, |
︙ | |||
987 988 989 990 991 992 993 | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | - + + + + - - - + + + + + + + + - + | */ static int CheckmemCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Interpreter for evaluation. */ int argc, /* Number of arguments. */ |
︙ | |||
1021 1022 1023 1024 1025 1026 1027 | 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | - - + + | void Tcl_InitMemory( Tcl_Interp *interp) /* Interpreter in which commands should be * added */ { TclInitDbCkalloc(); |
︙ | |||
1050 1051 1052 1053 1054 1055 1056 | 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 | - + - - | *---------------------------------------------------------------------- */ char * Tcl_Alloc( unsigned int size) { |
︙ | |||
1076 1077 1078 1079 1080 1081 1082 | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | - - - + | char * Tcl_DbCkalloc( unsigned int size, const char *file, int line) { |
︙ | |||
1102 1103 1104 1105 1106 1107 1108 | 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 | - - - + - - - - + - - + - - - - - + | *---------------------------------------------------------------------- */ char * Tcl_AttemptAlloc( unsigned int size) { |
︙ | |||
1180 1181 1182 1183 1184 1185 1186 | 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | - - - + - - - - + - | */ char * Tcl_AttemptRealloc( char *ptr, unsigned int size) { |
︙ |
Changes to generic/tclCmdIL.c.
︙ | |||
2616 2617 2618 2619 2620 2621 2622 | 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 | - + | return TCL_ERROR; } if (TCL_OK != TclGetIntFromObj(interp, objv[1], &elementCount)) { return TCL_ERROR; } if (elementCount < 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
3057 3058 3059 3060 3061 3062 3063 | 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 | - + | TclStackFree(interp, sortInfo.indexv); } if (i > objc-4) { if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
3695 3696 3697 3698 3699 3700 3701 | 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 | - + | switch ((enum Lsort_Switches) index) { case LSORT_ASCII: sortInfo.sortMode = SORTMODE_ASCII; break; case LSORT_COMMAND: if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
3720 3721 3722 3723 3724 3725 3726 | 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 | - + | break; case LSORT_INDEX: { int indexc, dummy; Tcl_Obj **indexv; if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
3771 3772 3773 3774 3775 3776 3777 | 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 | - + - + | break; case LSORT_INDICES: indices = 1; break; case LSORT_STRIDE: if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
3880 3881 3882 3883 3884 3885 3886 | 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 | - + - + | * Check for sanity when grouping elements of the overall list together * because of the -stride option. [TIP #326] */ if (group) { if (length % groupSize) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclCmdMZ.c.
︙ | |||
1857 1858 1859 1860 1861 1862 1863 | 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 | - + + - - + + - - - - | if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? charMap string"); return TCL_ERROR; } if (objc == 4) { |
︙ | |||
2123 2124 2125 2126 2127 2128 2129 | 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 | + - + - - - + + - - - - | if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? pattern string"); return TCL_ERROR; } if (objc == 4) { static const char *opt[] = { "-nocase", NULL }; |
︙ | |||
2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 | 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 | + + + - - + + + + + + + + - + - - + - - + - - - - - - - + | * the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...). */ const char *string1, *string2; int length1, length2, i, match, length, nocase = 0, reqlength = -1; typedef int (*strCmpFn_t)(const char *, const char *, unsigned int); strCmpFn_t strCmpFn; static const char *opts[] = { "-length", "-nocase", NULL }; enum opts { OPT_LENGTH, OPT_NOCASE }; if (objc < 3 || objc > 6) { str_cmp_args: Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? ?-length int? string1 string2"); return TCL_ERROR; } for (i = 1; i < objc-2; i++) { int idx; |
︙ | |||
2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 | 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 | + + + - - + + + + + + + + - + - - + - - + - - - - - - - + | * the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...). */ const char *string1, *string2; int length1, length2, i, match, length, nocase = 0, reqlength = -1; typedef int (*strCmpFn_t)(const char *, const char *, unsigned int); strCmpFn_t strCmpFn; static const char *opts[] = { "-length", "-nocase", NULL }; enum opts { OPT_LENGTH, OPT_NOCASE }; if (objc < 3 || objc > 6) { str_cmp_args: Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? ?-length int? string1 string2"); return TCL_ERROR; } for (i = 1; i < objc-2; i++) { int idx; |
︙ | |||
4015 4016 4017 4018 4019 4020 4021 | 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 | - + | * The type must be a list of at least length 1. */ if (Tcl_ListObjLength(interp, objv[1], &len) != TCL_OK) { return TCL_ERROR; } else if (len < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
4200 4201 4202 4203 4204 4205 4206 | 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 | - + - + - + - + - + | Tcl_DecrRefCount(handlersObj); return TCL_ERROR; } switch ((enum Handlers) type) { case TryFinally: /* finally script */ if (i < objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclCompCmdsSZ.c.
︙ | |||
2577 2578 2579 2580 2581 2582 2583 | 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 | - + | OP4( LIST, 2); OP44( RETURN_IMM, TCL_ERROR, 0); TclAdjustStackDepth(2, envPtr); OP( POP); OP( POP); OP( POP); issueErrorForEmptyCode: |
︙ |
Changes to generic/tclEnsemble.c.
︙ | |||
255 256 257 258 259 260 261 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + | Tcl_DecrRefCount(mapObj); } return TCL_ERROR; } if (len < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "ensemble subcommand implementations " |
︙ | |||
534 535 536 537 538 539 540 | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | - + | Tcl_DecrRefCount(patchedDict); } goto freeMapAndError; } if (len < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "ensemble subcommand implementations " |
︙ | |||
1941 1942 1943 1944 1945 1946 1947 | 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 | - + | " export any commands", TclGetString(objv[1+ensemblePtr->numParameters]), ensemblePtr->nsPtr->fullName)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", TclGetString(objv[1+ensemblePtr->numParameters]), NULL); return TCL_ERROR; } |
︙ |
Changes to generic/tclFileName.c.
︙ | |||
1333 1334 1335 1336 1337 1338 1339 | 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 | - + | goto endOfForLoop; } } endOfForLoop: if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclIO.c.
︙ | |||
7331 7332 7333 7334 7335 7336 7337 | 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 | - + | * TCL_ERROR. * * Side effects: * An error message is generated in interp's result object to indicate * that a command was invoked with the a bad option. The message has the * form: |
︙ | |||
7353 7354 7355 7356 7357 7358 7359 | 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 | + - + + + + + + + - - + + | * standard generic options. Can be NULL for * generic options only. */ { if (interp != NULL) { const char *genericopt = "blocking buffering buffersize encoding eofchar translation"; const char **argv; char *problemType = "bad"; |
︙ | |||
7705 7706 7707 7708 7709 7710 7711 | 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 | - + + | SetFlag(statePtr, CHANNEL_LINEBUFFERED); } else if ((newValue[0] == 'n') && (strncmp(newValue, "none", len) == 0)) { ResetFlag(statePtr, CHANNEL_LINEBUFFERED); SetFlag(statePtr, CHANNEL_UNBUFFERED); } else if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
7765 7766 7767 7768 7769 7770 7771 | 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 | - + + + | int outIndex = (argc - 1); int inValue = (int) argv[0][0]; int outValue = (int) argv[outIndex][0]; if (inValue & 0x80 || outValue & 0x80) { if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
7814 7815 7816 7817 7818 7819 7820 | 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 | - + + | writeMode = GotFlag(statePtr, TCL_WRITABLE) ? argv[0] : NULL; } else if (argc == 2) { readMode = GotFlag(statePtr, TCL_READABLE) ? argv[0] : NULL; writeMode = GotFlag(statePtr, TCL_WRITABLE) ? argv[1] : NULL; } else { if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
7842 7843 7844 7845 7846 7847 7848 | 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 | - - - + - - - - | } else if (strcmp(readMode, "cr") == 0) { translation = TCL_TRANSLATE_CR; } else if (strcmp(readMode, "crlf") == 0) { translation = TCL_TRANSLATE_CRLF; } else if (strcmp(readMode, "platform") == 0) { translation = TCL_PLATFORM_TRANSLATION; } else { |
︙ | |||
7892 7893 7894 7895 7896 7897 7898 | 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 | - - - + - - - - + + + + + + + + + | } else if (strcmp(writeMode, "cr") == 0) { statePtr->outputTranslation = TCL_TRANSLATE_CR; } else if (strcmp(writeMode, "crlf") == 0) { statePtr->outputTranslation = TCL_TRANSLATE_CRLF; } else if (strcmp(writeMode, "platform") == 0) { statePtr->outputTranslation = TCL_PLATFORM_TRANSLATION; } else { |
︙ |
Changes to generic/tclIOCmd.c.
︙ | |||
701 702 703 704 705 706 707 | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 | - + | * Check direction against channel mode. It is an error if we try to * close a direction not supported by the channel (already closed, or * never opened for that direction). */ if (!(dir & Tcl_GetChannelMode(chan))) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
1656 1657 1658 1659 1660 1661 1662 | 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 | - - + + | int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Channel inChan, outChan; int mode, i, index; Tcl_WideInt toRead; Tcl_Obj *cmdPtr; |
︙ |
Changes to generic/tclIOUtil.c.
︙ | |||
1655 1656 1657 1658 1659 1660 1661 | 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 | - - - + + + - + | mode |= O_TRUNC; } else if ((c == 'B') && (strcmp(flag, "BINARY") == 0)) { *binaryPtr = 1; } else { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ |
Changes to generic/tclIndexObj.c.
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + | * Results: * If the value of objPtr is identical to or a unique abbreviation for * one of the entries in tablePtr, then the return value is TCL_OK and the * index of the matching entry is stored at *indexPtr. If there isn't a * proper match, then TCL_ERROR is returned and an error message is left * in interp's result (unless interp is NULL). The msg argument is used * in the error message; for example, if msg has the value "option" then |
︙ | |||
325 326 327 328 329 330 331 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | - + + | } } /* * Check if we were instructed to disallow abbreviations. */ |
︙ | |||
365 366 367 368 369 370 371 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | - + - + | TclNewObj(resultPtr); entryPtr = tablePtr; while ((*entryPtr != NULL) && !**entryPtr) { entryPtr = NEXT_ENTRY(entryPtr, offset); } Tcl_AppendStringsToObj(resultPtr, |
︙ | |||
840 841 842 843 844 845 846 | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | - + | * Results: * None. * * Side effects: * An error message is generated in interp's result object to indicate * that a command was invoked with the wrong number of arguments. The * message has the form |
︙ | |||
1471 1472 1473 1474 1475 1476 1477 | 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 | - + | /* * Value is not a legal completion code. */ if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ |
Changes to generic/tclInt.h.
︙ | |||
2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 | 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 | + + + + + + + + | #define TCL_NUMBER_LONG 1 #define TCL_NUMBER_WIDE 2 #define TCL_NUMBER_BIG 3 #define TCL_NUMBER_DOUBLE 4 #define TCL_NUMBER_NAN 5 /* *---------------------------------------------------------------------- * Non-public flags for Tcl_GetIndexFromObj *---------------------------------------------------------------------- */ #define TCL_MULTIPLE_CHARS 2 /* *---------------------------------------------------------------- * Variables shared among Tcl modules but not used by the outside world. *---------------------------------------------------------------- */ MODULE_SCOPE char *tclNativeExecutableName; |
︙ |
Changes to generic/tclInterp.c.
︙ | |||
2305 2306 2307 2308 2309 2310 2311 | 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 | - + | { if (objc) { int length; if (TCL_ERROR == TclListObjLength(NULL, objv[0], &length) || (length < 1)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
2930 2931 2932 2933 2934 2935 2936 | 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 | - + | return TCL_ERROR; } if (TclGetIntFromObj(interp, objv[0], &limit) == TCL_ERROR) { return TCL_ERROR; } if (limit <= 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
4532 4533 4534 4535 4536 4537 4538 | 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 | - + - + | case OPT_GRAN: granObj = objv[i+1]; if (TclGetIntFromObj(interp, objv[i+1], &gran) != TCL_OK) { return TCL_ERROR; } if (gran < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
4741 4742 4743 4744 4745 4746 4747 | 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 | - + - + - + | case OPT_GRAN: granObj = objv[i+1]; if (TclGetIntFromObj(interp, objv[i+1], &gran) != TCL_OK) { return TCL_ERROR; } if (gran < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclOOBasic.c.
︙ | |||
542 543 544 545 546 547 548 | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - + | Tcl_SetObjResult(interp, Tcl_ObjPrintf( "object \"%s\" has no %s", TclGetString(tmpBuf), piece)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", TclGetString(objv[skip]), NULL); return TCL_ERROR; } |
︙ |
Changes to generic/tclOODefineCmds.c.
︙ | |||
1182 1183 1184 1185 1186 1187 1188 | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 | - + | */ if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } clsPtr = GetClassInOuterContext(interp, objv[1], |
︙ |
Changes to generic/tclOOMethod.c.
︙ | |||
1372 1373 1374 1375 1376 1377 1378 | 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 | - + | Tcl_Obj *cmdObj; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; } if (prefixLen < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
1413 1414 1415 1416 1417 1418 1419 | 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 | - + | Tcl_Obj *cmdObj; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; } if (prefixLen < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclTest.c.
︙ | |||
905 906 907 908 909 910 911 | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 | - + - + | } break; } } Tcl_MutexUnlock(&asyncTestMutex); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
1083 1084 1085 1086 1087 1088 1089 | 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 | - + | if (Tcl_SetCommandInfo(interp, argv[2], &info) == 0) { Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); } else { Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); } } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
1188 1189 1190 1191 1192 1193 1194 | 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | - + | Tcl_AppendElement(interp, Tcl_GetCommandName(interp, (Tcl_Command) l)); Tcl_AppendElement(interp, Tcl_GetString(objPtr)); Tcl_DecrRefCount(objPtr); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
1296 1297 1298 1299 1300 1301 1302 | 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 | - + | Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), NULL); } Tcl_DeleteTrace(interp, t2); Tcl_DeleteTrace(interp, t1); Tcl_DStringFree(&buffer); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
1432 1433 1434 1435 1436 1437 1438 | 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 | - + | } else if (strcmp(argv[1], "create2") == 0) { Tcl_CreateCommand(interp, "value:at:", CreatedCommandProc2, NULL, NULL); } else if (strcmp(argv[1], "delete2") == 0) { Tcl_DeleteCommand(interp, "value:at:"); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
1829 1830 1831 1832 1833 1834 1835 | 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 | - + | Tcl_SetResult(interp, s, TCL_DYNAMIC); } else if (strcmp(argv[2], "special") == 0) { char *s = (char*)ckalloc(100) + 16; strcpy(s, "This is a specially-allocated string"); Tcl_SetResult(interp, s, SpecialFree); } else { Tcl_AppendResult(interp, "bad gresult option \"", argv[2], |
︙ | |||
1860 1861 1862 1863 1864 1865 1866 | 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 | - + | } else if (strcmp(argv[1], "start") == 0) { if (argc != 2) { goto wrongNumArgs; } Tcl_DStringStartSublist(&dstring); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
2068 2069 2070 2071 2072 2073 2074 | 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 | - + | const char *script; flags = 0; if (objc == 3) { const char *global = Tcl_GetStringFromObj(objv[2], &length); if (strcmp(global, "global") != 0) { Tcl_AppendResult(interp, "bad value \"", global, |
︙ | |||
2351 2352 2353 2354 2355 2356 2357 | 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 | - + | Tcl_CreateExitHandler((value & 1) ? ExitProcOdd : ExitProcEven, (ClientData) INT2PTR(value)); } else if (strcmp(argv[1], "delete") == 0) { Tcl_DeleteExitHandler((value & 1) ? ExitProcOdd : ExitProcEven, (ClientData) INT2PTR(value)); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
5809 5810 5811 5812 5813 5814 5815 | 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 | - + | mask = TCL_READABLE; } else if (strcmp(argv[3], "writable") == 0) { mask = TCL_WRITABLE; } else if (strcmp(argv[3], "none") == 0) { mask = 0; } else { Tcl_AppendResult(interp, "bad event name \"", argv[3], |
︙ | |||
5840 5841 5842 5843 5844 5845 5846 | 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 | - + | return TCL_ERROR; } if (Tcl_GetInt(interp, argv[3], &index) == TCL_ERROR) { return TCL_ERROR; } if (index < 0) { Tcl_AppendResult(interp, "bad event index: ", argv[3], |
︙ | |||
5928 5929 5930 5931 5932 5933 5934 | 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 | - + | return TCL_ERROR; } if (Tcl_GetInt(interp, argv[3], &index) == TCL_ERROR) { return TCL_ERROR; } if (index < 0) { Tcl_AppendResult(interp, "bad event index: ", argv[3], |
︙ | |||
5950 5951 5952 5953 5954 5955 5956 | 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 | - + - + | mask = TCL_READABLE; } else if (strcmp(argv[4], "writable") == 0) { mask = TCL_WRITABLE; } else if (strcmp(argv[4], "none") == 0) { mask = 0; } else { Tcl_AppendResult(interp, "bad event name \"", argv[4], |
︙ |
Changes to generic/tclTestObj.c.
︙ | |||
375 376 377 378 379 380 381 | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | - + | } else { SetVarToObj(varPtr, varIndex, Tcl_NewBooleanObj(!boolValue)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), |
︙ | |||
494 495 496 497 498 499 500 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | - + | } else { SetVarToObj(varPtr, varIndex, Tcl_NewDoubleObj(doubleValue / 10.0)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), |
︙ | |||
801 802 803 804 805 806 807 | 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 | - + | } else { SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(intValue / 10)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), |
︙ | |||
1101 1102 1103 1104 1105 1106 1107 | 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | - + | if (Tcl_AppendAllObjTypes(interp, Tcl_GetObjResult(interp)) != TCL_OK) { return TCL_ERROR; } } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), |
︙ |
Changes to generic/tclTimer.c.
︙ | |||
826 827 828 829 830 831 832 | 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | - + | || (Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, &index) != TCL_OK)) { index = -1; if (Tcl_GetWideIntFromObj(NULL, objv[1], &ms) != TCL_OK) { const char *arg = Tcl_GetString(objv[1]); Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ |
Changes to generic/tclTrace.c.
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + | } #endif /* TCL_REMOVE_OBSOLETE_TRACES */ } return TCL_OK; badVarOps: Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
432 433 434 435 436 437 438 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | - + | result = Tcl_ListObjGetElements(interp, objv[4], &listLen, &elemPtrs); if (result != TCL_OK) { return result; } if (listLen == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
675 676 677 678 679 680 681 | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | - + | result = Tcl_ListObjGetElements(interp, objv[4], &listLen, &elemPtrs); if (result != TCL_OK) { return result; } if (listLen == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
874 875 876 877 878 879 880 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | - + | result = Tcl_ListObjGetElements(interp, objv[4], &listLen, &elemPtrs); if (result != TCL_OK) { return result; } if (listLen == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to generic/tclUtil.c.
︙ | |||
3608 3609 3610 3611 3612 3613 3614 | 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 | - + | * Report a parse error. */ parseError: if (interp != NULL) { bytes = Tcl_GetString(objPtr); Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
3701 3702 3703 3704 3705 3706 3707 | 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 | - + | */ bytes = TclGetStringFromObj(objPtr, &length); if ((*bytes != 'e') || (strncmp(bytes, "end", (size_t)((length > 3) ? 3 : length)) != 0)) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
3736 3737 3738 3739 3740 3741 3742 | 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 | - + | /* * Conversion failed. Report the error. */ badIndexFormat: if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ |
Changes to generic/tclZlib.c.
︙ | |||
2120 2121 2122 2123 2124 2125 2126 | 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 | - + - + | * -> channel */ return ZlibPushSubcmd(interp, objc, objv); }; return TCL_ERROR; badLevel: |
︙ | |||
2264 2265 2266 2267 2268 2269 2270 | 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 | - + | */ if (levelObj == NULL) { level = Z_DEFAULT_COMPRESSION; } else if (Tcl_GetIntFromObj(interp, levelObj, &level) != TCL_OK) { return TCL_ERROR; } else if (level < 0 || level > 9) { |
︙ | |||
2416 2417 2418 2419 2420 2421 2422 | 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 | - + - + | break; case poLevel: if (Tcl_GetIntFromObj(interp, objv[i], (int*) &level) != TCL_OK) { goto genericOptionError; } if (level < 0 || level > 9) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
2645 2646 2647 2648 2649 2650 2651 | 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 | - + - + - + | } else { flush = Z_FINISH; } break; case ao_buffer: /* -buffer */ if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
2769 2770 2771 2772 2773 2774 2775 | 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 | - + | } else { flush = Z_FINISH; } break; case po_dictionary: if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
3159 3160 3161 3162 3163 3164 3165 | 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 | - + | if (value[0] == 'f' && strcmp(value, "full") == 0) { flushType = Z_FULL_FLUSH; } else if (value[0] == 's' && strcmp(value, "sync") == 0) { flushType = Z_SYNC_FLUSH; } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
3204 3205 3206 3207 3208 3209 3210 | 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 | - + | if (optionName && strcmp(optionName, "-limit") == 0) { int newLimit; if (Tcl_GetInt(interp, value, &newLimit) != TCL_OK) { return TCL_ERROR; } else if (newLimit < 1 || newLimit > MAX_BUFFER_SIZE) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ |
Changes to library/clock.tcl.
︙ | |||
1225 1226 1227 1228 1229 1230 1231 | 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 | - + | -t - -ti - -tim - -time - -timez - -timezo - -timezon - -timezone { set timezone $value } default { return -code error \ -errorcode [list CLOCK badOption $flag] \ "bad option \"$flag\",\ |
︙ | |||
4231 4232 4233 4234 4235 4236 4237 | 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 | - + | # # Syntax: # clock add clockval ?count unit?... ?-option value? # # Parameters: # clockval -- Starting time value # count -- Amount of a unit of time to add |
︙ | |||
4293 4294 4295 4296 4297 4298 4299 | 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 | - + | -t - -ti - -tim - -time - -timez - -timezo - -timezon - -timezone { set timezone $b } default { throw [list CLOCK badOption $a] \ "bad option \"$a\",\ |
︙ | |||
4357 4358 4359 4360 4361 4362 4363 | 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 | - + | } seconds - second { set clockval [expr { $quantity + $clockval }] } default { throw [list CLOCK badUnit $unit] \ |
︙ |
Changes to library/http/http.tcl.
︙ | |||
157 158 159 160 161 162 163 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + - + | return $result } set options [string map {- ""} $options] set pat ^-(?:[join $options |])$ if {[llength $args] == 1} { set flag [lindex $args 0] if {![regexp -- $pat $flag]} { |
︙ | |||
338 339 340 341 342 343 344 345 346 347 348 349 350 351 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | + | body {} status "" http "" connection close } set state(-keepalive) $defaultKeepalive set state(-strict) $strict set state(accepttypes) $http(-accept) # These flags have their types verified [Bug 811170] array set type { -binary boolean -blocksize integer -queryblocksize integer -strict boolean -timeout integer |
︙ | |||
365 366 367 368 369 370 371 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | - + - + - + | # Validate numbers if { [info exists type($flag)] && ![string is $type($flag) -strict $value] } { unset $token return -code error \ |
︙ | |||
445 446 447 448 449 450 451 | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - + - + - + - + | (?: \# (.*) )? # <fragment> $ } # Phase one: parse if {![regexp -- $URLmatcher $url -> proto user host port srvurl]} { unset $token |
︙ | |||
501 502 503 504 505 506 507 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | - + - + - + | $ } if {$state(-strict) && ![regexp -- $validityRE $srvurl]} { unset $token # Provide a better error message in this error case if {[regexp {(?i)%(?![0-9a-f][0-9a-f])..} $srvurl bad]} { return -code error \ |
︙ | |||
689 690 691 692 693 694 695 | 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 | - + | # We cannot handle chunked encodings with -handler, so force HTTP/1.0 # until we can manage this. if {[info exists state(-handler)]} { set state(-protocol) 1.0 } if {[catch { puts $sock "$how $srvurl HTTP/$state(-protocol)" |
︙ | |||
1485 1486 1487 1488 1489 1490 1491 | 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 | - + + + - + + + | proc http::make-transformation-chunked {chan command} { set lambda {{chan command} { set data "" set size -1 yield while {1} { chan configure $chan -translation {crlf binary} |
︙ |
Changes to library/opt/optparse.tcl.
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | # flag used to detect that we just have a single (flags set) subprogram. set empty 1 foreach item $desc { if {$state == "args"} { # more items after 'args'... |
︙ | |||
825 826 827 828 829 830 831 | 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | - + | # Error messages front ends proc OptAmbigous {desc arg} { OptError "ambigous option \"$arg\", choose from:" [OptSelection $desc] } proc OptFlagUsage {desc arg} { |
︙ |
Changes to library/package.tcl.
︙ | |||
664 665 666 667 668 669 670 | 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | - + | append err(usage) "-name packageName -version packageVersion" append err(usage) "?-load {filename ?{procs}?}? ... " append err(usage) "?-source {filename ?{procs}?}? ..." set err(wrongNumArgs) "wrong # args: should be \"$err(usage)\"" set err(valueMissing) "value for \"%s\" missing: should be \"$err(usage)\"" set err(unknownOpt) "unknown option \"%s\": should be \"$err(usage)\"" |
︙ |
Changes to library/tcltest/tcltest.tcl.
︙ | |||
1131 1132 1133 1134 1135 1136 1137 | 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | - + | variable ConstraintInitializer DebugPuts 3 "entering ConstraintInitializer $constraint $script" if {[llength [info level 0]] == 2} { return $ConstraintInitializer($constraint) } # Check for boolean values if {![info complete $script]} { |
︙ | |||
1905 1906 1907 1908 1909 1910 1911 | 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 | - + - + | foreach flag [array names testAttributes] { if {$flag ni $validFlags} { incr testLevel -1 set sorted [lsort $validFlags] set options [join [lrange $sorted 0 end-1] ", "] append options ", or [lindex $sorted end]" |
︙ |
Changes to tests/assemble.test.
︙ | |||
1108 1109 1110 1111 1112 1113 1114 | 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | - + | } -result hello } test assemble-9.7 {concat} { -body { list [catch {assemble {concat 0}} result] $result $::errorCode } |
︙ | |||
1617 1618 1619 1620 1621 1622 1623 | 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 | - + | test assemble-16.4 {invokeStk - no operands} { -body { proc x {} { assemble {invokeStk 0} } list [catch x result] $result $::errorCode } |
︙ | |||
1938 1939 1940 1941 1942 1943 1944 | 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 | - + | test assemble-18.5 {lindexMulti - bad operand count} { -body { proc x {} { assemble {lindexMulti 0} } list [catch x result] $result $::errorCode } |
︙ | |||
2004 2005 2006 2007 2008 2009 2010 | 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 | - + | test assemble-19.5 {list - negative operand count} { -body { proc x {} { assemble {list -1} } list [catch x result] $result $::errorCode } |
︙ | |||
2070 2071 2072 2073 2074 2075 2076 | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 | - + | test assemble-20.5 {lsetFlat - negative operand count} { -body { proc x {} { assemble {lsetFlat 1} } list [catch x result] $result $::errorCode } |
︙ | |||
2130 2131 2132 2133 2134 2135 2136 | 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 | - + | test assemble-21.5 {over - negative operand count} { -body { proc x {} { assemble {over -1} } list [catch x result] $result $::errorCode } |
︙ | |||
2222 2223 2224 2225 2226 2227 2228 | 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 | - + | test assemble-22.5 {reverse - negative operand count} { -body { proc x {} { assemble {reverse -1} } list [catch x result] $result $::errorCode } |
︙ | |||
2561 2562 2563 2564 2565 2566 2567 | 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 | - + | test assemble-25.5 {dictGet - negative operand count} { -body { proc x {} { assemble {dictGet 0} } list [catch x result] $result $::errorCode } |
︙ | |||
2615 2616 2617 2618 2619 2620 2621 | 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 | - + | test assemble-26.5 {dictSet - zero operand count} { -body { proc x {} { assemble {dictSet 0 foo} } list [catch x result] $result $::errorCode } |
︙ | |||
2684 2685 2686 2687 2688 2689 2690 | 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 | - + | test assemble-27.5 {dictUnset - zero operand count} { -body { proc x {} { assemble {dictUnset 0 foo} } list [catch x result] $result $::errorCode } |
︙ |
Changes to tests/binary.test.
︙ | |||
2730 2731 2732 2733 2734 2735 2736 | 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 | - + | } test binary-74.9 {binary encode uuencode} -body { binary encode uuencode \0\0\0\0 } -result {$`````` } test binary-74.10 {binary encode uuencode} -returnCodes error -body { binary encode uuencode -foo 30 abcabcabc |
︙ |
Changes to tests/chan.test.
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + - + | # test chan-1.1 {chan command general syntax} -body { chan } -returnCodes error -result "wrong # args: should be \"chan subcommand ?arg ...?\"" test chan-1.2 {chan command general syntax} -body { chan FOOBAR |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + | chan pending stdin } -returnCodes error -result "wrong # args: should be \"chan pending mode channelId\"" test chan-16.3 {chan command: pending subcommand} -body { chan pending stdin stdout stderr } -returnCodes error -result "wrong # args: should be \"chan pending mode channelId\"" test chan-16.4 {chan command: pending subcommand} -body { chan pending {input output} stdout |
︙ |
Changes to tests/chanio.test.
︙ | |||
5013 5014 5015 5016 5017 5018 5019 | 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 | - + | } -body { set f1 [open $path(test1) w] lappend l [chan configure $f1 -buffering] lappend l [list [catch {chan configure $f1 -buffering green} msg] $msg] lappend l [chan configure $f1 -buffering] } -cleanup { chan close $f1 |
︙ | |||
5487 5488 5489 5490 5491 5492 5493 | 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 | - + | chan event gorp readable } -returnCodes error -result {can not find channel named "gorp"} test chan-io-41.4 {Tcl_FileeventCmd: errors} -constraints fileevent -body { chan event gorp writable } -returnCodes error -result {can not find channel named "gorp"} test chan-io-41.5 {Tcl_FileeventCmd: errors} -constraints fileevent -body { chan event gorp who-knows |
︙ |
Changes to tests/clock.test.
︙ | |||
269 270 271 272 273 274 275 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + | } {} test clock-1.4 "clock format - bad flag" {*}{ -body { list [catch {clock format 0 -oops badflag} msg] $msg $::errorCode } -match glob |
︙ | |||
35446 35447 35448 35449 35450 35451 35452 | 35446 35447 35448 35449 35450 35451 35452 35453 35454 35455 35456 35457 35458 35459 35460 | - + | set start [clock clicks] after 10 set end [clock clicks] expr "$end > $start" } {1} test clock-33.3 {clock clicks tests} { list [catch {clock clicks foo} msg] $msg |
︙ | |||
35481 35482 35483 35484 35485 35486 35487 | 35481 35482 35483 35484 35485 35486 35487 35488 35489 35490 35491 35492 35493 35494 35495 35496 35497 35498 | - + - + | expr { ($end > $start) && (($end - $start) <= 60) ? "ok" : "test should have taken 0-60 ms, actually took [expr $end - $start]"} } {ok} test clock-33.6 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks ? } msg] $msg |
︙ | |||
35603 35604 35605 35606 35607 35608 35609 | 35603 35604 35605 35606 35607 35608 35609 35610 35611 35612 35613 35614 35615 35616 35617 | - + | } {Oct 23,1992 15:00 GMT} test clock-34.8 {clock scan tests} { set time [clock scan "Oct 23,1992 15:00" -gmt true] clock format $time -format {%b %d,%Y %H:%M GMT} -gmt true } {Oct 23,1992 15:00 GMT} test clock-34.9 {clock scan tests} { list [catch {clock scan "Jan 12" -bad arg} msg] $msg |
︙ |
Changes to tests/cmdAH.test.
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + | } {4 {}} test cmdAH-4.1 {Tcl_EncodingObjCmd} -returnCodes error -body { encoding } -result {wrong # args: should be "encoding option ?arg ...?"} test cmdAH-4.2 {Tcl_EncodingObjCmd} -returnCodes error -body { encoding foo |
︙ | |||
227 228 229 230 231 232 233 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | - + | } -result identity test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body { file } -result {wrong # args: should be "file subcommand ?arg ...?"} test cmdAH-5.2 {Tcl_FileObjCmd} -returnCodes error -body { file x |
︙ | |||
1438 1439 1440 1441 1442 1443 1444 | 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 | - + - + - + - + - + - + - + | test cmdAH-29.5 {Tcl_FileObjCmd: type} { list [catch {file type _bogus_} msg] [string tolower $msg] $errorCode } {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} # Error conditions test cmdAH-30.1 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { file gorp x |
︙ |
Changes to tests/cmdIL.test.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + | testConstraint testobj [llength [info commands testobj]] test cmdIL-1.1 {Tcl_LsortObjCmd procedure} -returnCodes error -body { lsort } -result {wrong # args: should be "lsort ?-option value ...? list"} test cmdIL-1.2 {Tcl_LsortObjCmd procedure} -returnCodes error -body { lsort -foo {1 3 2 5} |
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + - + | lsort -dictionary {1k 0k 10k} } {0k 1k 10k} test cmdIL-1.10 {Tcl_LsortObjCmd procedure, -increasing option} { lsort -decreasing -increasing {d e c b a d35 d300} } {a b c d d300 d35 e} test cmdIL-1.11 {Tcl_LsortObjCmd procedure, -index option} -body { lsort -index {1 3 2 5} |
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + - + - + | lsort -stride 3 {f e d c b a} } {c b a f e d} test cmdIL-1.32 {lsort -stride errors} -returnCodes error -body { lsort -stride foo bar } -result {expected integer but got "foo"} test cmdIL-1.33 {lsort -stride errors} -returnCodes error -body { lsort -stride 1 bar |
︙ |
Changes to tests/cmdMZ.test.
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + - + | # Some tests for Tcl_ReturnObjCmd are in proc-old.test test cmdMZ-return-1.0 {return checks for bad option values} -body { return -options foo } -returnCodes error -match glob -result {bad -options value:*} test cmdMZ-return-1.1 {return checks for bad option values} -body { return -code err |
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + | list [catch {return -level 0 -code break} -> foo] [dictSort $foo] } {3 {-code 3 -level 0}} test cmdMZ-return-2.12 {return option handling} -body { return -level 0 -code error -options {-code ok} } -returnCodes ok -result {} test cmdMZ-return-2.13 {return option handling} -body { return -level 0 -code error -options {-code err} |
︙ |
Changes to tests/compile.test.
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + - + | test compile-11.1 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body { apply {{} { # shared object - Interp result && Var 'r' set r [list foobar] # command that will add error to result lindex a bogus }} |
︙ | |||
659 660 661 662 663 664 665 | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | - + | # change without warning. test compile-18.1 {disassembler - basics} -returnCodes error -body { tcl::unsupported::disassemble } -match glob -result {wrong # args: should be "*"} test compile-18.2 {disassembler - basics} -returnCodes error -body { tcl::unsupported::disassemble ? |
︙ |
Changes to tests/config.test.
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | test pkgconfig-2.0 {error: missing subcommand} { catch {::tcl::pkgconfig} msg set msg } {wrong # args: should be "::tcl::pkgconfig subcommand ?arg?"} test pkgconfig-2.1 {error: illegal subcommand} { catch {::tcl::pkgconfig foo} msg set msg |
︙ |
Changes to tests/dict.test.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | } test dict-1.1 {dict command basic syntax} -returnCodes error -body { dict } -result {wrong # args: should be "dict subcommand ?arg ...?"} test dict-1.2 {dict command basic syntax} -returnCodes error -body { dict ? |
︙ | |||
1060 1061 1062 1063 1064 1065 1066 | 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | - + | dict filter {a b} script "\{k v" {continue} } -result {unmatched open brace in list} test dict-17.21 {dict filter command} -returnCodes error -body { dict filter {a b} } -result {wrong # args: should be "dict filter dictionary filterType ?arg ...?"} test dict-17.22 {dict filter command} -returnCodes error -body { dict filter {a b} JUNK |
︙ |
Changes to tests/error.test.
︙ | |||
322 323 324 325 326 327 328 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - + - + | throw a b c } -result {wrong # args: should be "throw type message"} test error-8.8 {throw syntax checks} -returnCodes error -body { throw "not a \{ list" foo } -result {unmatched open brace in list} test error-8.9 {throw syntax checks} -returnCodes error -body { throw {} foo |
︙ | |||
1126 1127 1128 1129 1130 1131 1132 | 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 | - + - + | # It would seem appropriate to set at least those for the matching handler and # the executed body; possibly for each handler we fall through as well? # negative case try tests - bad "on" handler test error-20.1 {bad code name in on handler} -body { try { list a b c } on err {} {} |
︙ |
Changes to tests/event.test.
︙ | |||
585 586 587 588 589 590 591 | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | - + | } {3 3 done} test event-12.1 {Tcl_UpdateCmd procedure} -returnCodes error -body { update a b } -result {wrong # args: should be "update ?idletasks?"} test event-12.2 {Tcl_UpdateCmd procedure} -returnCodes error -body { update bogus |
︙ |
Changes to tests/exec.test.
︙ | |||
544 545 546 547 548 549 550 | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | - + | exec -keepnewline [interpreter] $path(echo) foo } "foo\n" test exec-14.2 {-keepnewline switch} -constraints {exec} -body { exec -keepnewline } -returnCodes error -result {wrong # args: should be "exec ?-option ...? arg ?arg ...?"} test exec-14.3 {unknown switch} -constraints {exec} -body { exec -gorp |
︙ |
Changes to tests/fCmd.test.
︙ | |||
192 193 194 195 196 197 198 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | - + | createfile tf1 file copy tf1 tf2 lsort [glob tf*] } -result {tf1 tf2} test fCmd-3.1 {FileCopyRename: FileForceOption fails} -constraints {notRoot} -body { file rename -xyz |
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - + | } -constraints {notRoot} -body { file mkdir tf1 file exists tf1 } -result {1} test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} -body { file delete -xyz |
︙ | |||
732 733 734 735 736 737 738 | 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | - + | } -result {} test fCmd-7.4 {FileForceOption: bad option} -constraints {notRoot} -setup { createfile -tf1 } -body { file delete -tf1 } -returnCodes error -cleanup { file delete -- -tf1 |
︙ | |||
2320 2321 2322 2323 2324 2325 2326 | 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | - + - + | file link } -result {wrong # args: should be "file link ?-linktype? linkname ?target?"} test fCmd-28.2 {file link} -returnCodes error -body { file link a b c d } -result {wrong # args: should be "file link ?-linktype? linkname ?target?"} test fCmd-28.3 {file link} -returnCodes error -body { file link abc b c |
︙ |
Changes to tests/fileName.test.
︙ | |||
697 698 699 700 701 702 703 | 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | - + | } -result {/home/ouster/foo} -constraints {nonPortable testtranslatefilename} test filename-11.1 {Tcl_GlobCmd} -returnCodes error -body { glob } -result {no files matched glob patterns ""} test filename-11.2 {Tcl_GlobCmd} -returnCodes error -body { glob -gorp |
︙ | |||
1010 1011 1012 1013 1014 1015 1016 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | - + - + | glob -path } -result {missing argument to "-path"} test filename-11.34 {Tcl_GlobCmd} -returnCodes error -body { glob -direct } -result {missing argument to "-directory"} test filename-11.35 {Tcl_GlobCmd} -returnCodes error -body { glob -paths * |
︙ | |||
1039 1040 1041 1042 1043 1044 1045 | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | - + | foreach f [glob -dir [pwd] *] { lappend res [file tail $f] } list $res [glob *] } -match compareWords -result equal test filename-11.43 {Tcl_GlobCmd} -returnCodes error -body { glob -t * |
︙ |
Changes to tests/history.test.
︙ | |||
239 240 241 242 243 244 245 | 239 240 241 242 243 244 245 246 247 248 249 250 | - + | # miscellaneous test history-9.1 {miscellaneous} history {catch {history gorp} msg} 1 test history-9.2 {miscellaneous} history { catch {history gorp} msg set msg |
Changes to tests/http.test.
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + - + - + | -urlencoding iso8859-1 set x [http::config] http::config {*}$savedconf set x } {-accept */* -proxyfilter myFilter -proxyhost nowhere.come -proxyport 8080 -urlencoding iso8859-1 -useragent {Tcl Test Suite}} test http-1.5 {http::config} -returnCodes error -body { http::config -proxyhost {} -junk 8080 |
︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - + - + - + - + - + - + - + - + - + - + | set token [http::geturl $fullurl -validate 1] http::code $token } -cleanup { http::cleanup $token } -result "HTTP/1.0 200 OK" test http-3.15 {http::geturl parse failures} -body { http::geturl "{invalid}:url" |
︙ |
Changes to tests/indexObj.test.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + - + - + - + - + - + - + - + | } 3 test indexObj-1.9 {exact match of empty values} testindexobj { testindexobj 1 0 {} a aa aaa {} b bb bbb } 3 test indexObj-2.1 {no match} testindexobj { list [catch {testindexobj 1 1 dddd abc def xalb xyz alm x} msg] $msg |
︙ |
Changes to tests/info.test.
︙ | |||
674 675 676 677 678 679 680 | 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | - + - + - + - + | unset functions msg test info-21.1 {miscellaneous error conditions} -returnCodes error -body { info } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp |
︙ |
Changes to tests/interp.test.
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + - + - + - + | # Part 0: Check out options for interp command test interp-1.1 {options for interp command} -returnCodes error -body { interp } -result {wrong # args: should be "interp cmd ?arg ...?"} test interp-1.2 {options for interp command} -returnCodes error -body { interp frobox |
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + | interp create b -safe } b test interp-2.6 {basic interpreter creation} { interp create d -safe } d test interp-2.7 {basic interpreter creation} { list [catch {interp create -froboz} msg] $msg |
︙ | |||
2383 2384 2385 2386 2387 2388 2389 | 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 | - + - + | list $result $msg } {1 {expected integer but got "bar"}} test interp-29.1.5 {interp recursionlimit argument checking} { interp create moo set result [catch {interp recursionlimit moo 0} msg] interp delete moo list $result $msg |
︙ | |||
2413 2414 2415 2416 2417 2418 2419 | 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 | - + - + | list $result $msg } {1 {expected integer but got "foo"}} test interp-29.1.10 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit 0} msg] interp delete moo list $result $msg |
︙ | |||
3382 3383 3384 3385 3386 3387 3388 | 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 | - + | interp limit } -returnCodes error -result {wrong # args: should be "interp limit path limitType ?-option value ...?"} test interp-35.2 {interp limit syntax} -body { interp limit {} } -returnCodes error -result {wrong # args: should be "interp limit path limitType ?-option value ...?"} test interp-35.3 {interp limit syntax} -body { interp limit {} foo |
︙ | |||
3411 3412 3413 3414 3415 3416 3417 | 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 | - + - + - + | interp delete $i } -result {} test interp-35.7 {interp limit syntax} -body { set i [interp create] interp limit $i commands -foobar } -cleanup { interp delete $i |
︙ | |||
3464 3465 3466 3467 3468 3469 3470 | 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 | - + - + - + - + | interp delete $i } -result {} test interp-35.15 {interp limit syntax} -body { set i [interp create] interp limit $i time -foobar } -cleanup { interp delete $i |
︙ | |||
3535 3536 3537 3538 3539 3540 3541 | 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 | - + - + | } -returnCodes error -result {wrong # args: should be "slave bgerror ?cmdPrefix?"} test interp-36.4 {SlaveBgerror syntax} -setup { interp create slave } -body { slave bgerror \{ } -cleanup { interp delete slave |
︙ | |||
3622 3623 3624 3625 3626 3627 3628 | 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 | - + | interp debug {} -f } -result {0} test interp-38.6 {interp debug basic setup} -body { interp debug -frames } -returnCodes error -result {could not find interpreter "-frames"} test interp-38.7 {interp debug basic setup} -body { interp debug {} -frames |
︙ |
Changes to tests/io.test.
︙ | |||
5164 5165 5166 5167 5168 5169 5170 | 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 | - + | set f1 [open $path(test1) w] set l "" lappend l [fconfigure $f1 -buffering] lappend l [list [catch {fconfigure $f1 -buffering green} msg] $msg] lappend l [fconfigure $f1 -buffering] close $f1 set l |
︙ | |||
5615 5616 5617 5618 5619 5620 5621 | 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 | - + | list [catch {fileevent gorp readable} msg] $msg } {1 {can not find channel named "gorp"}} test io-41.4 {Tcl_FileeventCmd: errors} {fileevent} { list [catch {fileevent gorp writable} msg] $msg } {1 {can not find channel named "gorp"}} test io-41.5 {Tcl_FileeventCmd: errors} {fileevent} { list [catch {fileevent gorp who-knows} msg] $msg |
︙ |
Changes to tests/ioCmd.test.
︙ | |||
166 167 168 169 170 171 172 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + + + + | seek a b c d e f g } -result {wrong # args: should be "seek channelId offset ?origin?"} test iocmd-5.3 {seek command} -returnCodes error -body { seek stdin gugu } -result {expected integer but got "gugu"} test iocmd-5.4 {seek command} -returnCodes error -body { seek stdin 100 gugu |
︙ | |||
193 194 195 196 197 198 199 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | - + + + + + + + + - + - + - + | } {1 {can not find channel named "aaa"}} test iocmd-7.4 {close command} -setup { set chan [open [info script] r] } -body { chan close $chan bar } -cleanup { close $chan |
︙ | |||
333 334 335 336 337 338 339 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | - + - + | # might fail if /dev/ttya is unavailable set tty [open /dev/ttya] fconfigure $tty -blah blih } -cleanup { if {$tty ne ""} { close $tty } |
︙ | |||
451 452 453 454 455 456 457 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 | - + - + - + | } "1 unmatched open brace in list unmatched open brace in list while processing open access modes \"FOO {BAR BAZ\" invoked from within \"open \$path(test3) \"FOO \\{BAR BAZ\"\"" test iocmd-12.7 {POSIX open access modes: errors} { list [catch {open $path(test3) {FOO BAR BAZ}} msg] $msg |
︙ | |||
635 636 637 638 639 640 641 | 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | - + + + + - + | list [catch {fcopy $wfile $wfile} msg] $msg } "1 {channel \"$wfile\" wasn't opened for reading}" test iocmd-15.9 {Tcl_FcopyObjCmd} {fcopy} { list [catch {fcopy $rfile $rfile} msg] $msg } "1 {channel \"$rfile\" wasn't opened for writing}" test iocmd-15.10 {Tcl_FcopyObjCmd} {fcopy} { list [catch {fcopy $rfile $wfile foo bar} msg] $msg |
︙ | |||
679 680 681 682 683 684 685 | 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | - + | set msg } {bad mode list: is empty} test iocmd-21.3 {chan create, invalid r/w mode, bad string} { proc foo {} {} catch {chan create {c} foo} msg rename foo {} set msg |
︙ | |||
723 724 725 726 727 728 729 | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | - + - + | set msg } -match glob -result {*all required methods*} test iocmd-21.11 {chan create, initialize failed, bad result, bogus method name} -body { proc foo {args} {return 1} catch {chan create {r w} foo} msg rename foo {} set msg |
︙ | |||
1967 1968 1969 1970 1971 1972 1973 | 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 | - + | set res {} proc foo {args} {oninit; onfinal; track; return} set c [chan create {r w} foo] catch {chan postevent $c goo} msg; note $msg close $c rename foo {} set res |
︙ |
Changes to tests/ioTrans.test.
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | # ### ### ### ######### ######### ######### test iortrans-1.0 {chan, wrong#args} -returnCodes error -body { chan } -result {wrong # args: should be "chan subcommand ?arg ...?"} test iortrans-1.1 {chan, unknown method} -returnCodes error -body { chan foo |
︙ | |||
177 178 179 180 181 182 183 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + - + - + | } -match glob -result {*all required methods*} test iortrans-2.10 {chan push, initialize failed, bad result, bogus method name} -body { proc foo {args} {return 1} chan push [tempchan] foo } -returnCodes error -cleanup { tempdone rename foo {} |
︙ |
Changes to tests/lindex.test.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | set x {1 2} list [testevalex {lindex {{a b c} {d e f}} $x}] \ [testevalex {lindex {{a b c} {d e f}} $x}] } {f f} test lindex-2.4 {malformed index list} testevalex { set x \{ list [catch { testevalex {lindex {a b c} $x} } result] $result |
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + - + | test lindex-4.7 {bad octal} -constraints testevalex -body { set x end--0o9 list [catch { testevalex {lindex {a b c} $x} } result] $result } -match glob -result {1 {*invalid octal number*}} test lindex-4.8 {bad integer, not octal} testevalex { set x end-0a2 list [catch { testevalex {lindex {a b c} $x} } result] $result |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - + | list [lindex {{a b c} {d e f}} $x] [lindex {{a b c} {d e f}} $x] } result set result } {f f} test lindex-10.4 {malformed index list} { set x \{ list [catch { lindex {a b c} $x } result] $result |
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | - + - + - + | test lindex-12.7 {bad octal} -body { set x end--0o9 list [catch { lindex {a b c} $x } result] $result } -match glob -result {1 {*invalid octal number*}} test lindex-12.8 {bad integer, not octal} { set x end-0a2 list [catch { lindex {a b c} $x } result] $result |
︙ |
Changes to tests/linsert.test.
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - + | } {a b e f c d} test linsert-2.1 {linsert errors} { list [catch linsert msg] $msg } {1 {wrong # args: should be "linsert list index ?element ...?"}} test linsert-2.2 {linsert errors} { list [catch {linsert a b} msg] $msg |
︙ |
Changes to tests/load.test.
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | list [catch {load -lazy {} {}} msg] $msg } {1 {must specify either file name or package name}} test load-1.6 {basic errors} {} { list [catch {load {} Unknown} msg] $msg } {1 {package "Unknown" isn't loaded statically}} test load-1.7 {basic errors} {} { list [catch {load -abc foo} msg] $msg |
︙ |
Changes to tests/lrange.test.
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + - + | list [catch {lrange a b} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} test lrange-2.2 {error conditions} { list [catch {lrange a b 6 7} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} test lrange-2.3 {error conditions} { list [catch {lrange a b 6} msg] $msg |
︙ |
Changes to tests/lrepeat.test.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | -result {expected integer but got "a"} } test lrepeat-1.4 {error cases} { -body { lrepeat -3 1 } -returnCodes 1 |
︙ |
Changes to tests/lreplace.test.
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + - + - + | list [catch lreplace msg] $msg } {1 {wrong # args: should be "lreplace list first last ?element ...?"}} test lreplace-2.2 {lreplace errors} { list [catch {lreplace a b} msg] $msg } {1 {wrong # args: should be "lreplace list first last ?element ...?"}} test lreplace-2.3 {lreplace errors} { list [catch {lreplace x a 10} msg] $msg |
︙ |
Changes to tests/lsearch.test.
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + | lsearch -glob {xyz bbcc *bc*} *bc* } 1 test lsearch-2.9 {search modes} { lsearch -glob {b.x ^bc xy bcx} ^bc } 1 test lsearch-2.10 {search modes} -returnCodes error -body { lsearch -glib {b.x bx xy bcx} b.x |
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + - + - + | lsearch } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.2 {lsearch errors} -returnCodes error -body { lsearch a } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.3 {lsearch errors} -returnCodes error -body { lsearch a b c |
︙ | |||
296 297 298 299 300 301 302 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | - + | lsearch -start 2 {a b c d e f} a } -1 test lsearch-10.3 {offset searching} { lsearch -start end-4 {a b c a b c} a } 3 test lsearch-10.4 {offset searching} -returnCodes error -body { lsearch -start foobar {a b c a b c} a |
︙ | |||
452 453 454 455 456 457 458 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | - + | } {{0 0 0} {1 0 0}} test lsearch-20.1 {lsearch -index option, index larger than sublists} -body { lsearch -index 2 {{a c} {a b} {a a}} a } -returnCodes error -result {element 2 missing from sublist "a c"} test lsearch-20.2 {lsearch -index option, malformed index} -body { lsearch -index foo {{a c} {a b} {a a}} a |
︙ |
Changes to tests/lset.test.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + | list [testevalex {lset x 0 3}] $x } {{3 1 2} {3 1 2}} test lset-2.2 {lset, not compiled, 3 args, second arg neither index nor list} testevalex { set x {0 1 2} list [catch { testevalex {lset x {{bad}1} 3} } msg] $msg |
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + | } msg] $msg } {1 {unmatched open brace in list}} test lset-4.2 {lset, not compiled, 3 args, bad index} testevalex { set a {x y z} list [catch { testevalex {lset a [list 2a2] w} } msg] $msg |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + | } msg] $msg } {1 {unmatched open brace in list}} test lset-4.8 {lset, not compiled, 3 args, bad index} testevalex { set a {x y z} list [catch { testevalex {lset a 2a2 w} } msg] $msg |
︙ | |||
269 270 271 272 273 274 275 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + - + | test lset-8.2 {lset, not compiled, malformed sublist} testevalex { set a [list "a \{" b] list [catch {testevalex {lset a {0 1} c}} msg] $msg } {1 {unmatched open brace in list}} test lset-8.3 {lset, not compiled, bad second index} testevalex { set a {{b c} {d e}} list [catch {testevalex {lset a 0 2a2 f}} msg] $msg |
︙ |
Changes to tests/namespace.test.
︙ | |||
904 905 906 907 908 909 910 | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | - + | test namespace-20.1 {Tcl_NamespaceObjCmd, bad subcommand} { catch {namespace delete {*}[namespace children :: test_ns_*]} list [catch {namespace} msg] $msg } {1 {wrong # args: should be "namespace subcommand ?arg ...?"}} test namespace-20.2 {Tcl_NamespaceObjCmd, bad subcommand} -body { namespace wombat {} |
︙ | |||
1021 1022 1023 1024 1025 1026 1027 | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | - + | test namespace-25.1 {NamespaceEvalCmd, bad args} { catch {namespace delete {*}[namespace children :: test_ns_*]} list [catch {namespace eval} msg] $msg } {1 {wrong # args: should be "namespace eval name arg ?arg...?"}} test namespace-25.2 {NamespaceEvalCmd, bad args} -body { namespace test_ns_1 |
︙ | |||
1526 1527 1528 1529 1530 1531 1532 | 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 | - + | } set result [list [ns x1] [ns x2]] lappend result [catch {ns x} msg] $msg rename ns {} lappend result [info command ns::x1] namespace delete ns lappend result [info command ns::x1] |
︙ | |||
1549 1550 1551 1552 1553 1554 1555 | 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 | - + | proc x2 {} {format 2} proc x3 {} {format 3} namespace ensemble create } list [catch {ns x} msg] $msg } -cleanup { namespace delete ns |
︙ | |||
1609 1610 1611 1612 1613 1614 1615 | 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 | - + | proc x1 {} {format 1} proc x2 {} {format 2} namespace ensemble create -map {a x1 b x2} } set result [list [catch {ns c} msg] $msg [namespace ensemble exists ns]] rename ns {} lappend result [namespace ensemble exists ns] |
︙ | |||
1638 1639 1640 1641 1642 1643 1644 | 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | - + - + - + - + - + - + - + - + | } } test namespace-43.3 {ensembles: list-driven} -setup $SETUP -body { namespace delete ns } -result {} test namespace-43.4 {ensembles: list-driven} -setup $SETUP -body { ns a foo bar boo spong wibble |
︙ | |||
1776 1777 1778 1779 1780 1781 1782 | 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 | - + | catch {ns ?} msg; set result [list $msg] namespace eval ns {namespace export x*} catch {ns ?} msg; lappend result $msg rename ns::x1 {} catch {ns ?} msg; lappend result $msg namespace delete ns set result |
︙ | |||
1853 1854 1855 1856 1857 1858 1859 | 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 | - + | namespace ensemble create -map {a a} -prefixes 0 } set result [list [catch {ns x} msg] $msg] namespace ensemble configure ns -map {b b} lappend result [catch {ns x} msg] $msg namespace delete ns set result |
︙ | |||
1916 1917 1918 1919 1920 1921 1922 | 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 | - + | variable count incr count proc b {} {} } namespace ensemble create -unknown ::ns::Magic } list [catch {ns spong} msg] $msg $ns::count [namespace delete ns] |
︙ | |||
2758 2759 2760 2761 2762 2763 2764 | 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 | - + | rename ns {} lappend result [info command ns::x1] namespace delete ns lappend result [info command ns::x1] } -result\ {{1 x2} {2 x1}\ 1 {wrong # args: should be "ns param1 subcommand ?arg ...?"}\ |
︙ | |||
2795 2796 2797 2798 2799 2800 2801 | 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 | - + - + | lappend result [catch {ns x1 x} msg] $msg namespace ensemble configure ns -parameters p1 lappend result [catch {ns x1 x} msg] $msg lappend result [catch {ns x x1} msg] $msg } -cleanup { namespace delete ns } -result\ |
︙ | |||
2863 2864 2865 2866 2867 2868 2869 | 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 | - + | lappend result [catch {ns x2 x1} msg] $msg [namespace ensemble configure ns -parameters] lappend result [catch {ns x2 x3} msg] $msg [namespace ensemble configure ns -parameters] } -cleanup { namespace delete ns } -result\ {0 {1 x2} {}\ 0 {1 x2} p1\ |
︙ |
Changes to tests/obj.test.
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + - + | lappend result [testobj refcount 1] } {{} 12 12 bytearray 3} test obj-3.1 {Tcl_ConvertToType error} testobj { list [testdoubleobj set 1 12.34] \ [catch {testobj convert 1 end-offset} msg] \ $msg |
︙ |
Changes to tests/oo.test.
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | while executing \"oo::define oo::object method missingArgs\"" test oo-1.4 {basic test of OO functionality} -body { oo::object create {} } -returnCodes 1 -result {object name must not be empty} test oo-1.5 {basic test of OO functionality} -body { oo::object doesnotexist |
︙ | |||
577 578 579 580 581 582 583 | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + - + - + | test oo-4.1 {basic test of OO functionality: export} { set o [oo::object new] set result {} oo::objdefine $o method Foo {} {lappend ::result Foo; return} lappend result [catch {$o Foo} msg] $msg oo::objdefine $o export Foo lappend result [$o Foo] [$o destroy] |
︙ | |||
636 637 638 639 640 641 642 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | - + - + - + - + - + | } -body { oo::objdefine oo::object method foo {} { return "in object" } catch {$obj foo} result list [catch {$obj foo} result] $result [oo::object foo] } -cleanup { oo::objdefine oo::object deletemethod foo $obj destroy |
︙ | |||
1009 1010 1011 1012 1013 1014 1015 | 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | - + | oo::define subClass superclass superClass set result [list [catch {subClass doit bad} msg] $msg] instance doit ok return $result } -cleanup { subClass destroy superClass destroy |
︙ | |||
1078 1079 1080 1081 1082 1083 1084 | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | - + | lappend result [meta make classinstance { lappend ::result "in definition script in [namespace current]" }] lappend result [classinstance create instance] } -cleanup { catch {classinstance destroy} catch {meta destroy} |
︙ | |||
1106 1107 1108 1109 1110 1111 1112 | 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | - + | lappend ::result "in definition script in [namespace current]" }] lappend result [classinstance create instance] } -cleanup { catch {classinstance destroy} catch {meta destroy} catch {other destroy} |
︙ | |||
1154 1155 1156 1157 1158 1159 1160 | 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 | - + | oo::objdefine c method foo {} { next } catch {c ?} msg set result [list $msg] catch {c foo} msg lappend result $msg $errorInfo } -cleanup { A destroy |
︙ | |||
1557 1558 1559 1560 1561 1562 1563 | 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 | - + - + | set result [list [catch {fooTest ?} msg] $msg] fooTest bar fooTest boo fooTest2 bar fooTest2 boo oo::objdefine fooTest2 mixin lappend result [Bclass destroy] [info command fooTest*] [Aclass destroy] |
︙ | |||
1874 1875 1876 1877 1878 1879 1880 | 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 | - + | info object } -returnCodes 1 -result "wrong \# args: should be \"info object subcommand ?arg ...?\"" test oo-16.2 {OO: object introspection} -body { info object class NOTANOBJECT } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} test oo-16.3 {OO: object introspection} -body { info object gorp oo::object |
︙ | |||
1996 1997 1998 1999 2000 2001 2002 | 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 | - + | } -body { info class superclass foo } -returnCodes 1 -cleanup { foo destroy } -result {"foo" is not a class} test oo-17.4 {OO: class introspection} -body { info class gorp oo::object |
︙ | |||
2755 2756 2757 2758 2759 2760 2761 | 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 | - + - + | cls destroy } -returnCodes error -body { oo::define cls { method dummy {} {} method unknown args {next {*}$args} } [cls new] foo bar |
︙ | |||
3153 3154 3155 3156 3157 3158 3159 | 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 | - + | variable -? y method boo {} { return [incr x],[incr y] } } foo create bar list [bar boo] [bar boo] |
︙ | |||
3412 3413 3414 3415 3416 3417 3418 | 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 | - + | test oo-33.4 {TIP 380: slots - errors} -setup { set s [SampleSlot new] } -body { # Method names beginning with "-" are special to slots $s -grill q } -returnCodes error -cleanup { rename $s {} |
︙ |
Changes to tests/package.test.
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | ::pkg::create -version 1.0 -source test.tcl -load foo.so } -returnCodes error -match glob -result {value for "-name" missing: *} test package-1.5 {pkg::create gives error on no version given} -body { ::pkg::create -name foo -source test.tcl -load foo.so } -returnCodes error -match glob -result {value for "-version" missing: *} test package-1.6 {pkg::create gives error on no source or load options} -body { ::pkg::create -name foo -version 1.0 -version 2.0 |
︙ | |||
822 823 824 825 826 827 828 | 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | - + | package vs 2.3 2.1 } {1} test package-4.52 {Tcl_PackageCmd procedure, "vsatisfies" option} { package vs 2.3 1.2 } {0} test package-4.53 {Tcl_PackageCmd procedure, "versions" option} -body { package foo |
︙ | |||
1244 1245 1246 1247 1248 1249 1250 | 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | - + | } -result latest test package-14.0 {wrong\#args} -returnCodes error -body { package prefer foo bar } -result {wrong # args: should be "package prefer ?latest|stable?"} test package-14.1 {bogus argument} -returnCodes error -body { package prefer foo |
︙ |
Changes to tests/proc-old.test.
︙ | |||
404 405 406 407 408 409 410 | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + - + | list [catch {tproc continue} msg] $msg } {4 abc} test proc-old-7.6 {return with special completion code} { list [catch {tproc -14} msg] $msg } {-14 abc} test proc-old-7.7 {return with special completion code} -body { tproc err |
︙ |
Changes to tests/regexp.test.
︙ | |||
243 244 245 246 247 248 249 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | - + - + | list [catch {regexp a} msg] $msg } {1 {wrong # args: should be "regexp ?-option ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexp-6.2 {regexp errors} { list [catch {regexp -nocase a} msg] $msg } {1 {wrong # args: should be "regexp ?-option ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexp-6.3 {regexp errors} { list [catch {regexp -gorp a} msg] $msg |
︙ | |||
449 450 451 452 453 454 455 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - + - + | list [catch {regsub -nocase -all a b} msg] $msg } {1 {wrong # args: should be "regsub ?-option ...? exp string subSpec ?varName?"}} test regexp-11.4 {regsub errors} { list [catch {regsub a b c d e f} msg] $msg } {1 {wrong # args: should be "regsub ?-option ...? exp string subSpec ?varName?"}} test regexp-11.5 {regsub errors} { list [catch {regsub -gorp a b c} msg] $msg |
︙ |
Changes to tests/regexpComp.test.
︙ | |||
322 323 324 325 326 327 328 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + | list [catch {regexp -nocase a} msg] $msg } } {1 {wrong # args: should be "regexp ?-option ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexpComp-6.3 {regexp errors} { evalInProc { list [catch {regexp -gorp a} msg] $msg } |
︙ | |||
354 355 356 357 358 359 360 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | - + | list [catch {regexp abc abc f1(f2)} msg] $msg } } {1 {can't set "f1(f2)": variable isn't array}} test regexpComp-6.9 {regexp errors, -start bad int check} { evalInProc { list [catch {regexp -start bogus {^$} {}} msg] $msg } |
︙ | |||
578 579 580 581 582 583 584 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | - + - + | list [catch {regsub a b c d e f} msg] $msg } } {1 {wrong # args: should be "regsub ?-option ...? exp string subSpec ?varName?"}} test regexpComp-11.5 {regsub errors} { evalInProc { list [catch {regsub -gorp a b c} msg] $msg } |
︙ |
Changes to tests/registry.test.
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + | list [catch {registry -32bit} msg] $msg } {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} test registry-1.1b {argument parsing for registry command} {win reg} { list [catch {registry -64bit} msg] $msg } {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} test registry-1.2 {argument parsing for registry command} {win reg} { list [catch {registry foo} msg] $msg |
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - + | } {1 {wrong # args: should be "registry values keyName ?pattern?"}} test registry-1.23 {argument parsing for registry command} {win reg} { list [catch {registry values foo bar baz} msg] $msg } {1 {wrong # args: should be "registry values keyName ?pattern?"}} test registry-2.1 {DeleteKey: bad key} {win reg} { list [catch {registry delete foo} msg] $msg |
︙ | |||
596 597 598 599 600 601 602 | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | - + - + - + - + | registry values \\ } -returnCodes error -result "bad key \"\\\": must start with a valid root" test registry-9.2 {ParseKeyName: bad keys} -constraints {win reg} -body { registry values \\foobar } -returnCodes error -result {bad key "\foobar": must start with a valid root} test registry-9.3 {ParseKeyName: bad keys} -constraints {win reg} -body { registry values \\\\ |
︙ |
Changes to tests/safe.test.
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | - + | } -result {wrong # args: should be "encoding option ?arg ...?"} test safe-11.1a {testing safe encoding} -setup { set i [safe::interpCreate] } -body { interp eval $i encoding foobar } -returnCodes error -cleanup { safe::interpDelete $i |
︙ |
Changes to tests/set-old.test.
︙ | |||
331 332 333 334 335 336 337 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - + | } foo } {1 {"x" isn't an array}} test set-old-8.6 {array command} { catch {unset a} set a(22) 3 list [catch {array gorp a} msg] $msg |
︙ | |||
423 424 425 426 427 428 429 | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | - + | } list [catch {foo 1} msg] $msg } {0 {}} test set-old-8.22 {array command, names option} { catch {unset a} set a(22) 3 list [catch {array names a 4 5} msg] $msg |
︙ |
Changes to tests/socket.test.
︙ | |||
279 280 281 282 283 284 285 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - + | socket -myport xxxx } -returnCodes error -result {expected integer but got "xxxx"} test socket_$af-1.7 {arg parsing for socket command} -constraints [list socket supported_$af] -body { socket -myport 2522 } -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} test socket_$af-1.8 {arg parsing for socket command} -constraints [list socket supported_$af] -body { socket -froboz |
︙ |
Changes to tests/string.test.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + | testConstraint testindexobj [expr {[info commands testindexobj] != {}}] # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] test string-1.1 {error conditions} { list [catch {string gorp a b} msg] $msg |
︙ | |||
176 177 178 179 180 181 182 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - + | } 1 test string-4.1 {string first, too few args} { list [catch {string first a} msg] $msg } {1 {wrong # args: should be "string first needleString haystackString ?startIndex?"}} test string-4.2 {string first, bad args} { list [catch {string first a b c} msg] $msg |
︙ | |||
241 242 243 244 245 246 247 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + | string index abcde 5 } {} test string-5.6 {string index} { list [catch {string index abcde -10} msg] $msg } {0 {}} test string-5.7 {string index} { list [catch {string index a xyz} msg] $msg |
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + - + | list [catch {string is alpha -failin str} msg] $msg } {1 {wrong # args: should be "string is alpha ?-strict? ?-failindex var? str"}} test string-6.4 {string is, too many args} { list [catch {string is alpha -failin var -strict str more} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} test string-6.5 {string is, class check} { list [catch {string is bogus str} msg] $msg |
︙ | |||
755 756 757 758 759 760 761 | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 | - + | catch {rename largest_int {}} test string-7.1 {string last, too few args} { list [catch {string last a} msg] $msg } {1 {wrong # args: should be "string last needleString haystackString ?startIndex?"}} test string-7.2 {string last, bad args} { list [catch {string last a b c} msg] $msg |
︙ | |||
841 842 843 844 845 846 847 | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | - + | } 8 test string-10.1 {string map, too few args} { list [catch {string map} msg] $msg } {1 {wrong # args: should be "string map ?-nocase? charMap string"}} test string-10.2 {string map, bad args} { list [catch {string map {a b} abba oops} msg] $msg |
︙ | |||
1066 1067 1068 1069 1070 1071 1072 | 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | - + | string match "" "" } 1 test string-11.29 {string match} { string match \[a a } 1 test string-11.30 {string match, bad args} { list [catch {string match - b c} msg] $msg |
︙ | |||
1219 1220 1221 1222 1223 1224 1225 | 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 | - + - + | string range abcdefghijklmnop 1000 1010 } {} test string-12.11 {string range} { string range abcdefghijklmnop -100 end } {abcdefghijklmnop} test string-12.12 {string range} { list [catch {string range abc abc 1} msg] $msg |
︙ | |||
1350 1351 1352 1353 1354 1355 1356 | 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + - + - + | string replace abcdefghijklmnop 1000 1010 } {abcdefghijklmnop} test string-14.12 {string replace} { string replace abcdefghijklmnop -100 end } {} test string-14.13 {string replace} { list [catch {string replace abc abc 1} msg] $msg |
︙ | |||
1403 1404 1405 1406 1407 1408 1409 | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | - + | } b test string-16.1 {string toupper} { list [catch {string toupper} msg] $msg } {1 {wrong # args: should be "string toupper string ?first? ?last?"}} test string-16.2 {string toupper} { list [catch {string toupper a b} msg] $msg |
︙ | |||
1437 1438 1439 1440 1441 1442 1443 | 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 | - + | } B test string-17.1 {string totitle} { list [catch {string totitle} msg] $msg } {1 {wrong # args: should be "string totitle string ?first? ?last?"}} test string-17.2 {string totitle} { list [catch {string totitle a b} msg] $msg |
︙ | |||
1509 1510 1511 1512 1513 1514 1515 | 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 | - + | } \u1361ABC test string-20.1 {string trimright errors} { list [catch {string trimright} msg] $msg } {1 {wrong # args: should be "string trimright string ?chars?"}} test string-20.2 {string trimright errors} { list [catch {string trimg a} msg] $msg |
︙ | |||
1531 1532 1533 1534 1535 1536 1537 | 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 | - + | list [catch {string wordend a} msg] $msg } {1 {wrong # args: should be "string wordend string index"}} test string-21.2 {string wordend} { list [catch {string wordend a b c} msg] $msg } {1 {wrong # args: should be "string wordend string index"}} test string-21.3 {string wordend} { list [catch {string wordend a gorp} msg] $msg |
︙ | |||
1568 1569 1570 1571 1572 1573 1574 | 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 | - + - + | } 3 test string-21.14 {string wordend, unicode} { string wordend "\uc700\uc700 abc" 8 } 6 test string-22.1 {string wordstart} { list [catch {string word a} msg] $msg |
︙ | |||
1771 1772 1773 1774 1775 1776 1777 | 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 | - + | } {0 2} test string-26.1 {tcl::prefix, too few args} -body { tcl::prefix match a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix match ?options? table string"} test string-26.2 {tcl::prefix, bad args} -body { tcl::prefix match a b c |
︙ | |||
1795 1796 1797 1798 1799 1800 1801 | 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 | - + - + - + - + | tcl::prefix match {apa bepa cepa depa} cepa } cepa test string-26.6 {tcl::prefix} { tcl::prefix match {apa bepa cepa depa} be } bepa test string-26.7 {tcl::prefix} -body { tcl::prefix match -exact {apa bepa cepa depa} be |
︙ |
Changes to tests/stringComp.test.
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | return [expr {$end - $tmp}] } } test stringComp-1.1 {error conditions} { proc foo {} {string gorp a b} list [catch {foo} msg] $msg |
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + | set i 0 foreach {tname tbody tresult tcode} { {too few args} { string compare a } {wrong # args: should be "string compare ?-nocase? ?-length int? string1 string2"} {error} {bad args} { string compare a b c |
︙ | |||
225 226 227 228 229 230 231 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - + | test stringComp-4.1 {string first, too few args} { proc foo {} {string first a} list [catch {foo} msg] $msg } {1 {wrong # args: should be "string first needleString haystackString ?startIndex?"}} test stringComp-4.2 {string first, bad args} { proc foo {} {string first a b c} list [catch {foo} msg] $msg |
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | - + | test stringComp-5.6 {string index} { proc foo {} {string index abcde -10} list [catch {foo} msg] $msg } {0 {}} test stringComp-5.7 {string index} { proc foo {} {string index a xyz} list [catch {foo} msg] $msg |
︙ | |||
557 558 559 560 561 562 563 | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | - + | test stringComp-11.29 {string match} { proc foo {} {string match \[a a} foo } 1 test stringComp-11.30 {string match, bad args} { proc foo {} {string match - b c} list [catch {foo} msg] $msg |
︙ |
Changes to tests/subst.test.
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + | } test subst-1.1 {basics} -returnCodes error -body { subst } -result {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"} test subst-1.2 {basics} -returnCodes error -body { subst a b c |
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + - + | test subst-6.1 {clear the result after command substitution} -body { catch {unset a} subst {[concat foo] $a} } -returnCodes error -result {can't read "a": no such variable} test subst-7.1 {switches} -returnCodes error -body { subst foo bar |
︙ |
Changes to tests/switch.test.
︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + | -* {subst glob} -glob {subst exact} default {subst none} } } exact test switch-3.6 {-exact vs. -glob vs. -regexp} -body { switch -foo a b c |
︙ |
Changes to tests/tcltest.test.
︙ | |||
1193 1194 1195 1196 1197 1198 1199 | 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | - + | test tcltest-21.2 {force a test command failure} { -body { test tcltest-21.2.0 { return 2 } {1} } -returnCodes 1 |
︙ | |||
1286 1287 1288 1289 1290 1291 1292 | 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 | - + - + | -cleanup {set ::tcltest::currentFailure $fail} -body { test tcltest-21.7.0 {foo-4} { -foobar {} } } -returnCodes 1 |
︙ | |||
1548 1549 1550 1551 1552 1553 1554 | 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 | - + | } -setup { customMatch [namespace current]::alwaysMatch "format 1 ;#" } -body { list [catch { test tcltest-24.5.0 {} \ -match [namespace current]::noSuchMode } result] $result |
︙ |
Changes to tests/timer.test.
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + - + | } -result {2 24 4} test timer-6.1 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { after } -result {wrong # args: should be "after option ?arg ...?"} test timer-6.2 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { after 2x |
︙ |
Changes to tests/tm.test.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | test tm-1.1 {tm: path command exists} { catch { ::tcl::tm::path } info commands ::tcl::tm::path } ::tcl::tm::path test tm-1.2 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path foo |
︙ |
Changes to tests/trace.test.
︙ | |||
865 866 867 868 869 870 871 | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | - + - + - + - + - + | } [list 1 "wrong # args: should be \"trace remove type ?arg ...?\""] test trace-14.4 "trace command, wrong # args errors" { list [catch {trace info} msg] $msg } [list 1 "wrong # args: should be \"trace info type name\""] test trace-14.5 {trace command, invalid option} { list [catch {trace gorp} msg] $msg |
︙ |
Changes to tests/winDde.test.
︙ | |||
244 245 246 247 248 249 250 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | - + | dde eval "" "foo" } -returnCodes error -result {invalid service name ""} # ------------------------------------------------------------------------- test winDde-6.1 {DDE servername bad arguments} -constraints dde -body { dde servername -z -z -z |
︙ |
Changes to tests/zlib.test.
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | } test zlib-1.1 {zlib basics} -constraints zlib -returnCodes error -body { zlib } -result {wrong # args: should be "zlib command arg ?...?"} test zlib-1.2 {zlib basics} -constraints zlib -returnCodes error -body { zlib ? {} |
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + | test zlib-7.0 {zlib stream} -constraints zlib -returnCodes error -setup { set s [zlib stream compress] } -body { $s ? } -cleanup { $s close |
︙ | |||
741 742 743 744 745 746 747 | 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | - + | after cancel {set ::total timeout} after cancel {set ::total done} set ::total } -cleanup { close $srv rename bgerror {} } -returnCodes error \ |
︙ |
Changes to unix/tclUnixChan.c.
︙ | |||
635 636 637 638 639 640 641 | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | - + | #endif /* CRTSCTS */ } else if (Tcl_UtfNcasecmp(value, "DTRDSR", vlen) == 0) { UNSUPPORTED_OPTION("-handshake DTRDSR"); return TCL_ERROR; } else { if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | |||
754 755 756 757 758 759 760 | 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | - + | UNSUPPORTED_OPTION("-ttycontrol BREAK"); ckfree(argv); return TCL_ERROR; #endif /* TIOCSBRK & TIOCCBRK */ } else { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
1212 1213 1214 1215 1216 1217 1218 | 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | - + | "%s: should be baud,parity,data,stop", bad)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", NULL); } return TCL_ERROR; } /* |
︙ |
Changes to unix/tclUnixTest.c.
︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + | if (i & TCL_WRITABLE) { Tcl_AppendElement(interp, "writable"); } } else if (strcmp(argv[1], "windowevent") == 0) { Tcl_DoOneEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ | |||
383 384 385 386 387 388 389 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | - + | mask = TCL_READABLE; } else if (strcmp(argv[2], "writable") == 0){ mask = TCL_WRITABLE; } else if (strcmp(argv[2], "both") == 0){ mask = TCL_WRITABLE|TCL_READABLE; } else { Tcl_AppendResult(interp, "bad argument \"", argv[2], |
︙ |
Changes to unix/tclXtTest.c.
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + | while (!done) { XtAppProcessEvent(TclSetAppContext(NULL), XtIMAll); } (void) Tcl_SetServiceMode(oldMode); framePtr = oldFramePtr; } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ |
Changes to win/tclWinDde.c.
︙ | |||
553 554 555 556 557 558 559 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | - + | Tcl_Obj *ddeObjectPtr) /* The object to execute. */ { Tcl_Obj *returnPackagePtr; int result = TCL_OK; if (riPtr->handlerPtr == NULL && Tcl_IsSafe(riPtr->interp)) { Tcl_SetObjResult(riPtr->interp, Tcl_NewStringObj("permission denied: " |
︙ | |||
1710 1711 1712 1713 1714 1715 1716 | 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 | - + | * to other objects owned by the target interp. If the target * interp is then deleted, the bytecode structure would be * referring to deallocated objects. */ if (Tcl_IsSafe(riPtr->interp) && riPtr->handlerPtr == NULL) { Tcl_SetObjResult(riPtr->interp, Tcl_NewStringObj( |
︙ |
Changes to win/tclWinSerial.c.
︙ | |||
1745 1746 1747 1748 1749 1750 1751 | 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 | - + | dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; } else if (strncasecmp(value, "DTRDSR", vlen) == 0) { dcb.fOutxDsrFlow = TRUE; dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; } else { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ | |||
1882 1883 1884 1885 1886 1887 1888 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 | - + | } result = TCL_ERROR; break; } } else { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |
︙ |
Changes to win/tclWinTest.c.
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + | TranslateMessage(&msg); DispatchMessage(&msg); } (void) Tcl_SetServiceMode(oldMode); framePtr = oldFramePtr; } else { Tcl_AppendResult(interp, "bad option \"", argv[1], |
︙ |