summaryrefslogtreecommitdiffstats
path: root/tests/basic.test
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2023-03-03 12:15:11 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2023-03-03 12:15:11 (GMT)
commitd3aa6839f45e33d533ae9525378612cb04ab0dd1 (patch)
treec559ab87f027d879c591ec84470bcf46a1a88cb0 /tests/basic.test
parent4d674569535d565275d4a4d4a16a8c63ed7c41f9 (diff)
downloadtcl-d3aa6839f45e33d533ae9525378612cb04ab0dd1.zip
tcl-d3aa6839f45e33d533ae9525378612cb04ab0dd1.tar.gz
tcl-d3aa6839f45e33d533ae9525378612cb04ab0dd1.tar.bz2
Fix Valgrind "still reachable" report in TestcmdtokenCmd().
Diffstat (limited to 'tests/basic.test')
-rw-r--r--tests/basic.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/basic.test b/tests/basic.test
index f4c57fe..de986c7 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -336,19 +336,19 @@ test basic-20.1 {Tcl_GetCommandInfo, names for commands created inside namespace
}]
list [testcmdtoken name $x] \
[rename ::p q] \
- [testcmdtoken name $x]
+ [testcmdtoken name $x][testcmdtoken free $x]
} {{p ::p} {} {q ::q}}
test basic-20.2 {Tcl_GetCommandInfo, names for commands created outside namespaces} {testcmdtoken} {
catch {rename q ""}
set x [testcmdtoken create test_ns_basic::test_ns_basic2::p]
list [testcmdtoken name $x] \
[rename test_ns_basic::test_ns_basic2::p q] \
- [testcmdtoken name $x]
+ [testcmdtoken name $x][testcmdtoken free $x]
} {{p ::test_ns_basic::test_ns_basic2::p} {} {q ::q}}
test basic-20.3 {Tcl_GetCommandInfo, #-quoting} testcmdtoken {
catch {rename \# ""}
set x [testcmdtoken create \#]
- testcmdtoken name $x
+ return [testcmdtoken name $x][testcmdtoken free $x]
} {{#} ::#}
test basic-21.1 {Tcl_GetCommandName} {emptyTest} {