diff options
author | dgp <dgp@users.sourceforge.net> | 2016-07-02 20:19:07 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-07-02 20:19:07 (GMT) |
commit | 34c15ad75ddd738a990e32b922d54519b7747d4f (patch) | |
tree | 18540e5fdaad70315e4ecaf337669d540d5ed948 | |
parent | bca9eb80cf41d03ab1c3c8d0c989e94a874b3cb6 (diff) | |
parent | 4bd6120473dd85fd3e91adc5d5d1fd2dcb88a694 (diff) | |
download | tcl-34c15ad75ddd738a990e32b922d54519b7747d4f.zip tcl-34c15ad75ddd738a990e32b922d54519b7747d4f.tar.gz tcl-34c15ad75ddd738a990e32b922d54519b7747d4f.tar.bz2 |
merge trunk
-rw-r--r-- | generic/tclEnsemble.c | 13 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 2 | ||||
-rw-r--r-- | tests/namespace.test | 9 |
3 files changed, 13 insertions, 11 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 03ee7e8..617a481 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -1674,18 +1674,11 @@ NsEnsembleImplementationCmdNR( */ Tcl_DString buf; /* Message being built */ - Tcl_Obj **elemPtrs; /* Parameter names */ - int len; /* Number of parameters to append */ Tcl_DStringInit(&buf); - if (ensemblePtr->parameterList == NULL) { - len = 0; - } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, - &len, &elemPtrs) != TCL_OK) { - Tcl_Panic("List of ensemble parameters is not a list"); - } - for (; len>0; len--,elemPtrs++) { - TclDStringAppendObj(&buf, *elemPtrs); + if (ensemblePtr->parameterList) { + Tcl_DStringAppend(&buf, + TclGetString(ensemblePtr->parameterList), -1); TclDStringAppendLiteral(&buf, " "); } TclDStringAppendLiteral(&buf, "subcommand ?arg ...?"); diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 2e83952..75975d2 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -2709,7 +2709,7 @@ proc tcltest::GetMatchingDirectories {rootdir} { DebugPuts 1 "No test directories remain after applying match\ and skip patterns!" } - return $matchDirs + return [lsort $matchDirs] } # tcltest::runAllTests -- diff --git a/tests/namespace.test b/tests/namespace.test index 0de416b..2a5f308 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -2153,6 +2153,15 @@ test namespace-50.7 {[4402cfa58c]} -setup { rename e2 {} rename target {} } -result {{wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"}} +test namespace-50.8 {[f961d7d1dd]} -setup { + proc target {} {} + namespace ensemble create -command e -map {s target} -parameters {{a b}} +} -body { + e +} -returnCodes error -result {wrong # args: should be "e {a b} subcommand ?arg ...?"} -cleanup { + rename e {} + rename target {} +} test namespace-51.1 {name resolution path control} -body { namespace eval ::test_ns_1 { |